forked from conan-io/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* android_abi() * Update reference/conanfile/tools/android.rst --------- Co-authored-by: Carlos Zoido <[email protected]>
- Loading branch information
1 parent
a5ec99d
commit 369e7f6
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,3 +56,4 @@ Contents: | |
tools/layout | ||
tools/scm | ||
tools/build | ||
tools/android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. _conan_tools_android: | ||
|
||
conan.tools.android | ||
=================== | ||
|
||
.. important:: | ||
|
||
Some of the features used in this section are still **under development**, while they are | ||
recommended and usable and we will try not to break them in future releases, some breaking | ||
changes might still happen if necessary to prepare for the *Conan 2.0 release*. | ||
|
||
|
||
android_abi() | ||
------------- | ||
|
||
Available since: 1.59.0 | ||
|
||
This function might not be necessary when using Conan built-in integrations, as they already manage it, | ||
but can be useful if developing your own build system integration. | ||
|
||
``android_abi()`` function returns the Android standard ABI name based on Conan ``settings.arch`` value, something like: | ||
|
||
.. code-block:: python | ||
def android_abi(conanfile, context="host"): | ||
... | ||
return { | ||
"armv5el": "armeabi", | ||
"armv5hf": "armeabi", | ||
"armv5": "armeabi", | ||
"armv6": "armeabi-v6", | ||
"armv7": "armeabi-v7a", | ||
"armv7hf": "armeabi-v7a", | ||
"armv8": "arm64-v8a", | ||
}.get(conanfile.settings.arch) | ||
As it can be seen, the default is the "host" ABI, but it is possible to select also the "build" or "target" ones if necessary. | ||
|
||
.. code-block:: python | ||
from conan.tools.android import android_abi | ||
class Pkg(ConanFile): | ||
def generate(self) | ||
abi = android_abi(self) |