Skip to content

Commit 531ae64

Browse files
Added new conf variable. Fixed typo (#3787)
1 parent 0852afb commit 531ae64

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

reference/tools/gnu/autotoolstoolchain.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ conf
259259
- ``tools.build:linker_scripts`` list of linker scripts, each of which will be prefixed with ``-T`` and added to ``LDFLAGS``.
260260
Only use this flag with linkers that supports specifying linker scripts with the ``-T`` flag, such as ``ld``, ``gold``, and ``lld``.
261261
- ``tools.build:sysroot`` defines the ``--sysroot`` flag to the compiler.
262+
- ``tools.android:ndk_path`` (*new since Conan 2.5.0*) argument for NDK path in case of Android cross-compilation. It is used to set
263+
some environment variables like ``CC``, ``CXX``, ``LD``, ``STRIP``, ``RANLIB``, ``AS``, and ``AR`` in the *conanautotoolstoolchain.sh|bat* script.
262264
- ``tools.build:compiler_executables`` dict-like Python object which specifies the
263265
compiler as key and the compiler executable path as value. Those keys will be mapped as
264266
follows:

reference/tools/meson/mesontoolchain.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,25 @@ in this example of host profile:
284284
tools.apple:sdk_path=/my/path/to/iPhoneOS.sdk
285285
286286
287+
**Android**
288+
289+
It initializes the ``MesonToolchain`` ``c``, ``cpp``, and ``ar`` attributes, which are needed to cross-compile for Android, given the
290+
Conan settings for Android and the ``tools.android:ndk_path`` configuration value like it's shown
291+
in this example of host profile:
292+
293+
294+
.. code-block:: text
295+
:caption: **android_host_profile**
296+
297+
[settings]
298+
os = Android
299+
os.api_level = 21
300+
arch = armv8
301+
302+
[conf]
303+
tools.android:ndk_path=/my/path/to/NDK
304+
305+
287306
Cross-building and native=true
288307
------------------------------
289308

@@ -316,25 +335,6 @@ as public attributes of the ``MesonToolchain`` class, where the variables ``objc
316335
``objcpp`` are initialized as ``clang`` and ``clang++`` respectively by default.
317336

318337

319-
**Android**
320-
321-
It initializes the ``MesonToolchain`` ``c``, ``cpp``, and ``ar`` attributes, which are needed to cross-compile for Android, given the
322-
Conan settings for Android and the ``tools.android:ndk_path`` configuration value like it's shown
323-
in this example of host profile:
324-
325-
326-
.. code-block:: text
327-
:caption: **android_host_profile**
328-
329-
[settings]
330-
os = Android
331-
os.api_level = 21
332-
arch = armv8
333-
334-
[conf]
335-
tools.android:ndk_path=/my/path/to/NDK
336-
337-
338338
.. seealso::
339339

340340
- :ref:`Getting started with Meson<examples_tools_meson_toolchain_build_simple_meson_project>`

0 commit comments

Comments
 (0)