diff options
author | Antonin Godard <antonin.godard@bootlin.com> | 2025-07-22 15:33:37 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-01 11:59:18 +0100 |
commit | 649c93080f1e6db1f5c8c8436a797038a5c12c87 (patch) | |
tree | 92e54b395060f24ca84bfaa0de6cc4fd77066830 /documentation/ref-manual/classes.rst | |
parent | e9a49660a5bc3f42b414e4da9bfc0070dbf762d5 (diff) | |
download | poky-649c93080f1e6db1f5c8c8436a797038a5c12c87.tar.gz |
ref-manual: document new toolchain classes and variables
Document the new classes under classes/toolchain as well as
PREFERRED_TOOLCHAIN* and TOOLCHAIN variables, which allow selecting the
toolchain. For now there's "gcc" and "clang" as available toolchain.
(From yocto-docs rev: 69a9568f8bd7ed57efddab507a4294ad3408f4dd)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual/classes.rst')
-rw-r--r-- | documentation/ref-manual/classes.rst | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index 4705ca3f4d..ff41c84a73 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst | |||
@@ -3443,6 +3443,86 @@ This class is not intended to be used directly. | |||
3443 | The :ref:`ref-classes-toolchain-scripts` class provides the scripts used for setting up | 3443 | The :ref:`ref-classes-toolchain-scripts` class provides the scripts used for setting up |
3444 | the environment for installed SDKs. | 3444 | the environment for installed SDKs. |
3445 | 3445 | ||
3446 | .. _ref-classes-toolchain-clang: | ||
3447 | |||
3448 | ``toolchain/clang`` | ||
3449 | =================== | ||
3450 | |||
3451 | The :ref:`ref-classes-toolchain-clang` class defines commands for building | ||
3452 | recipes with Clang/LLVM compiler and utilities. | ||
3453 | |||
3454 | This class is not meant to be inherited directly. Instead, you should either: | ||
3455 | |||
3456 | - set the :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE` | ||
3457 | or :term:`PREFERRED_TOOLCHAIN_SDK` variables to "clang" from a | ||
3458 | :term:`Configuration File`. This will make the :ref:`ref-classes-base` class | ||
3459 | use the :ref:`ref-classes-toolchain-clang` accordingly. All recipes will | ||
3460 | be built with the Clang/LLVM toolchain, exception be made for recipes that | ||
3461 | override the value of :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to | ||
3462 | another value. | ||
3463 | |||
3464 | - set :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to "clang" from a recipe | ||
3465 | when the recipe needs to override the default toolchain set by | ||
3466 | :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE` or | ||
3467 | :term:`PREFERRED_TOOLCHAIN_SDK`. | ||
3468 | |||
3469 | .. _ref-classes-toolchain-clang-native: | ||
3470 | |||
3471 | ``toolchain/clang-native`` | ||
3472 | ========================== | ||
3473 | |||
3474 | The :ref:`ref-classes-toolchain-clang-native` class defines commands for | ||
3475 | building :ref:`ref-classes-native` recipes with Clang/LLVM compiler and | ||
3476 | utilities independently of the build context. | ||
3477 | |||
3478 | The :ref:`ref-classes-toolchain-gcc-native` class defines :term:`BUILD_CC`, | ||
3479 | :term:`BUILD_CXX` and other such variables which are rarely used in recipes. | ||
3480 | Exception be made for target recipes that need to use the compiler from the | ||
3481 | build host at some point during the build. | ||
3482 | |||
3483 | This class should not be inherited directly. It is inherited by the | ||
3484 | :ref:`ref-classes-base` class if :term:`TOOLCHAIN_NATIVE` is set to "clang". | ||
3485 | |||
3486 | .. _ref-classes-toolchain-gcc: | ||
3487 | |||
3488 | ``toolchain/gcc`` | ||
3489 | ================= | ||
3490 | |||
3491 | The :ref:`ref-classes-toolchain-gcc` class defines commands for building | ||
3492 | recipes with GCC/Binutils compiler and utilities. | ||
3493 | |||
3494 | This class is not meant to be inherited directly. Instead, you should either: | ||
3495 | |||
3496 | - set the :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE` | ||
3497 | or :term:`PREFERRED_TOOLCHAIN_SDK` variables to "gcc" from a | ||
3498 | :term:`Configuration File`. This will make the :ref:`ref-classes-base` class | ||
3499 | use the :ref:`ref-classes-toolchain-gcc` accordingly. All recipes will | ||
3500 | be built with the GCC/Binutils toolchain, exception be made for recipes that | ||
3501 | override the value of :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to | ||
3502 | another value. | ||
3503 | |||
3504 | - set :term:`TOOLCHAIN` or :term:`TOOLCHAIN_NATIVE` to "gcc" from a recipe | ||
3505 | when the recipe needs to override the default toolchain set by | ||
3506 | :term:`PREFERRED_TOOLCHAIN_TARGET`, :term:`PREFERRED_TOOLCHAIN_NATIVE` or | ||
3507 | :term:`PREFERRED_TOOLCHAIN_SDK`. | ||
3508 | |||
3509 | .. _ref-classes-toolchain-gcc-native: | ||
3510 | |||
3511 | ``toolchain/gcc-native`` | ||
3512 | ======================== | ||
3513 | |||
3514 | The :ref:`ref-classes-toolchain-gcc-native` class defines commands for building | ||
3515 | :ref:`ref-classes-native` recipes with GCC/Binutils compiler and utilities | ||
3516 | independently of the build context. | ||
3517 | |||
3518 | The :ref:`ref-classes-toolchain-gcc-native` class defines :term:`BUILD_CC`, | ||
3519 | :term:`BUILD_CXX` and other such variables which are rarely used in recipes. | ||
3520 | Exception be made for target recipes that need to use the compiler from the build | ||
3521 | host at some point during the build. | ||
3522 | |||
3523 | This class should not be inherited directly. It is inherited by the | ||
3524 | :ref:`ref-classes-base` class if :term:`TOOLCHAIN_NATIVE` is set to "gcc". | ||
3525 | |||
3446 | .. _ref-classes-typecheck: | 3526 | .. _ref-classes-typecheck: |
3447 | 3527 | ||
3448 | ``typecheck`` | 3528 | ``typecheck`` |