summaryrefslogtreecommitdiffstats
path: root/meta/classes/toolchain/clang.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* The poky repository master branch is no longer being updated.Richard Purdie2025-11-071-40/+0
| | | | | | | | | | | | | | | | | | | | | You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/toolchain/clang: Add placeholder for dynamic linker in ↵Khem Raj2025-10-301-0/+1
| | | | | | | | | | | | | | | | | | | cross-canadian packages clang-cross-canadian is just symlinking into nativesdk-clang unlike gcc which has separate binaries and they have inbuilt dynamic linker specs. To help clang built cross-canadian binaries add it via cmdline option here, cross-canadian binaries are only usable on installed SDKs, and these paths get re-written with correct SDK specific linker during SDK install relocation process. This helps clang built cross-canadian tools e.g. from binutils-cross-canadian be relocated correctly on SDK install. (From OE-Core rev: d259796efd6c405dd47fabccdbce761cb29fc354) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/toolchain/clang: depend on llvm-native for tools, not clangRoss Burton2025-10-091-2/+2
| | | | | | | | | | The relevant tools (objdump, strip, etc) are part of llvm-native now, so trim dependencies and depend on that directly instead of clang-cross. (From OE-Core rev: 732fb127b59b2d8fd23c2716355ba44f3f5a6a9d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/toolchain/clang: compiler-rt and libcxx are not target-specificRoss Burton2025-08-041-2/+1
| | | | | | | | | | | This file can be used for nativesdk builds, which if they are using the clang toolchain will also need compiler-rt and libcxx. (From OE-Core rev: 24c32edb1b29a0746bb4470fea11e87b8027d9f9) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain/clang: Add clang specific sysroot dependenciesKhem Raj2025-07-281-0/+3
| | | | | | | | | | Add clang-cross to sysroot via POPULATESYSROOTDEPS to get llvm tools e.g. llvm-strip, llvm-nm etc when they are used at default STRIP/NM etc. (From OE-Core rev: 0d239586ec2f258a42d60f9fb6a058344516218a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* clang: Add libcxx to default base dependenciesKhem Raj2025-07-211-1/+1
| | | | | | | | | | | When TC_CXX_RUNTIME is set to be 'llvm' then clang looks for libcxx to provide C++ runtime and unwinding library (From OE-Core rev: aba2d949818b032222dbaed98e38cd29e3c992b6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain/gcc/clang: Update PREFERRED_PROVIDER to work with multilibsRichard Purdie2025-06-161-9/+12
| | | | | | | | | | | | | As currently written, the PREFERRED_PROVIDER entries don't work with multilib since they are added after the manipulations by multilib_global at ConfigParsed time. We therefore need to spell out the configs correctly for multilib. To avoid variable overwritten warnings from the expansion, we then have to expand out the nativesdk providers usng class overrides. (From OE-Core rev: 1f69850b62d1e022055d0f3b93ad270c2980462e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain: Provide abstraction for recipe specific toolchain selectionRichard Purdie2025-06-161-0/+34
This change implements a toolchain selection mechanism. Selection is made using a set of variables, primarily PREFERRED_TOOLCHAIN_TARGET which defaults to gcc. It uses the familiar name for toolchain e.g. "gcc" which selects GNU compiler + binutils as default C/C++ toolchain or "clang" which will use LLVM/Clang Compiler. Layers an add their own toolchain definitions too. There are also PREFERRED_TOOLCHAIN_NATIVE and PREFERRED_TOOLCHAIN_SDK which will ulitmately allow selection of the toolchain used for the native/cross and nativesdk/crosssdk compilers. This currently isn't functional but is essential to the patch to ensure things are set to the existing gcc support in those cases. Users would most commonly want to set: PREFERRED_TOOLCHAIN_TARGET ?= "clang" in local.conf or other distro specific global configuration metadata. It is also selectable at recipe scope, since not all packages are buildable with either clang or gcc, a recipe can explicitly require a given toolchain using the TOOLCAHIN variable, e.g. glibc can not be built with clang therefore glibc recipe sets: TOOLCHAIN = "gcc" The TOOLCHAIN variable is distinct from the user preference so recipes with specific requirements can be identified. This also allows different polcies to be be specified for native/SDK cases in the future. (From OE-Core rev: 45bdedd213aff8df3214b95ef2a8551c0abd93a0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>