summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/clang.bbclass3
-rw-r--r--classes/lto.bbclass7
2 files changed, 10 insertions, 0 deletions
diff --git a/classes/clang.bbclass b/classes/clang.bbclass
index 88dd893..2d08c10 100644
--- a/classes/clang.bbclass
+++ b/classes/clang.bbclass
@@ -18,6 +18,9 @@ TUNE_CCARGS_append_toolchain-clang = " -Wno-error=unused-command-line-argument -
18TOOLCHAIN_OPTIONS_append_toolchain-clang_class-nativesdk_x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2" 18TOOLCHAIN_OPTIONS_append_toolchain-clang_class-nativesdk_x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2"
19TOOLCHAIN_OPTIONS_append_toolchain-clang_class-nativesdk_x86 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux.so.2" 19TOOLCHAIN_OPTIONS_append_toolchain-clang_class-nativesdk_x86 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux.so.2"
20 20
21# Enable lld globally"
22TOOLCHAIN_OPTIONS_append_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=lld', '', d)}"
23
21# choose between 'gcc' 'clang' an empty '' can be used as well 24# choose between 'gcc' 'clang' an empty '' can be used as well
22TOOLCHAIN ??= "gcc" 25TOOLCHAIN ??= "gcc"
23 26
diff --git a/classes/lto.bbclass b/classes/lto.bbclass
new file mode 100644
index 0000000..80a3d4d
--- /dev/null
+++ b/classes/lto.bbclass
@@ -0,0 +1,7 @@
1# Enable LTO based on global distro settings
2TOOLCHAIN_OPTIONS_append_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', ' -flto=thin -fuse-ld=gold', '', d)}"
3TOOLCHAIN_OPTIONS_append_toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'full-lto', ' -flto=full -fuse-ld=gold', '', d)}"
4RANLIB_toolchain-clang = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib"
5AR_toolchain-clang = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar"
6NM_toolchain-clang = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm"
7