diff options
| author | Khem Raj <raj.khem@gmail.com> | 2019-09-30 10:34:07 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-10-01 15:58:36 -0700 |
| commit | bfa67c067f749e6cc9c0733a03207fb77d4e175f (patch) | |
| tree | b7d0bd732190c9aec774aff9ce237ec4cf5fa621 | |
| parent | 8f454e7d3fb185f369b6f33ccd7827bb688600c4 (diff) | |
| download | meta-clang-bfa67c067f749e6cc9c0733a03207fb77d4e175f.tar.gz | |
clang-runtime: Use INHIBIT_DEFAULT_DEPS = "1"
This ensures that clang-runtime elements e.g. llvm-libunwind can be used
with gcc as well
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | classes/clang.bbclass | 14 | ||||
| -rw-r--r-- | recipes-devtools/clang/compiler-rt_git.bb | 4 | ||||
| -rw-r--r-- | recipes-devtools/clang/libcxx_git.bb | 3 | ||||
| -rw-r--r-- | recipes-devtools/clang/llvm-libunwind.bb | 4 |
4 files changed, 19 insertions, 6 deletions
diff --git a/classes/clang.bbclass b/classes/clang.bbclass index a8f2c90..2e5bab1 100644 --- a/classes/clang.bbclass +++ b/classes/clang.bbclass | |||
| @@ -60,7 +60,7 @@ OVERRIDES[vardepsexclude] += "TOOLCHAIN" | |||
| 60 | #DEPENDS_append_toolchain-clang_class-target = " clang-cross-${TARGET_ARCH} " | 60 | #DEPENDS_append_toolchain-clang_class-target = " clang-cross-${TARGET_ARCH} " |
| 61 | #DEPENDS_remove_toolchain-clang_allarch = "clang-cross-${TARGET_ARCH}" | 61 | #DEPENDS_remove_toolchain-clang_allarch = "clang-cross-${TARGET_ARCH}" |
| 62 | 62 | ||
| 63 | def clang_dep_prepend(d): | 63 | def clang_base_deps(d): |
| 64 | if not d.getVar('INHIBIT_DEFAULT_DEPS', False): | 64 | if not d.getVar('INHIBIT_DEFAULT_DEPS', False): |
| 65 | if not oe.utils.inherits(d, 'allarch') : | 65 | if not oe.utils.inherits(d, 'allarch') : |
| 66 | ret = " clang-cross-${TARGET_ARCH} virtual/libc " | 66 | ret = " clang-cross-${TARGET_ARCH} virtual/libc " |
| @@ -79,10 +79,16 @@ def clang_dep_prepend(d): | |||
| 79 | 79 | ||
| 80 | def clang_remove_deps(d): | 80 | def clang_remove_deps(d): |
| 81 | ret = "" | 81 | ret = "" |
| 82 | if (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1): | 82 | if (d.getVar('UNWINDLIB').find('--unwindlib=libunwind') != -1): |
| 83 | ret += "libunwind" | 83 | ret += "libunwind" |
| 84 | return ret | 84 | return ret |
| 85 | 85 | ||
| 86 | BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_dep_prepend(d)}" | 86 | def clang_add_deps(d): |
| 87 | DEPENDS_remove_toolchain-clang_class-target = "${@clang_remove_deps(d)}" | 87 | ret = "" |
| 88 | if (d.getVar('UNWINDLIB').find('--unwindlib=libunwind') != -1): | ||
| 89 | ret += " llvm-libunwind " | ||
| 90 | return ret | ||
| 91 | BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_base_deps(d)}" | ||
| 92 | DEPENDS_remove_class-target = "${@clang_remove_deps(d)}" | ||
| 93 | BASE_DEFAULT_DEPS_append_class-target = "${@clang_add_deps(d)}" | ||
| 88 | 94 | ||
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index c24329c..3d335ef 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb | |||
| @@ -17,7 +17,9 @@ LIBCPLUSPLUS = "" | |||
| 17 | COMPILER_RT = "" | 17 | COMPILER_RT = "" |
| 18 | TUNE_CCARGS_remove = "-no-integrated-as" | 18 | TUNE_CCARGS_remove = "-no-integrated-as" |
| 19 | 19 | ||
| 20 | DEPENDS += "ninja-native" | 20 | INHIBIT_DEFAULT_DEPS = "1" |
| 21 | |||
| 22 | DEPENDS += "ninja-native clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" | ||
| 21 | DEPENDS_append_class-nativesdk = " clang-native" | 23 | DEPENDS_append_class-nativesdk = " clang-native" |
| 22 | 24 | ||
| 23 | THUMB_TUNE_CCARGS = "" | 25 | THUMB_TUNE_CCARGS = "" |
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index 6d94ac4..ed07f2e 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb | |||
| @@ -11,9 +11,12 @@ require common-source.inc | |||
| 11 | inherit cmake pythonnative | 11 | inherit cmake pythonnative |
| 12 | 12 | ||
| 13 | DEPENDS += "ninja-native" | 13 | DEPENDS += "ninja-native" |
| 14 | DEPENDS += "ninja-native compiler-rt clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs llvm-libunwind" | ||
| 14 | 15 | ||
| 15 | LIBCPLUSPLUS = "" | 16 | LIBCPLUSPLUS = "" |
| 16 | 17 | ||
| 18 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 19 | |||
| 17 | LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ | 20 | LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ |
| 18 | file://libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \ | 21 | file://libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \ |
| 19 | " | 22 | " |
diff --git a/recipes-devtools/clang/llvm-libunwind.bb b/recipes-devtools/clang/llvm-libunwind.bb index 7dbdf4f..49e060b 100644 --- a/recipes-devtools/clang/llvm-libunwind.bb +++ b/recipes-devtools/clang/llvm-libunwind.bb | |||
| @@ -11,9 +11,10 @@ require common-source.inc | |||
| 11 | inherit cmake pythonnative | 11 | inherit cmake pythonnative |
| 12 | 12 | ||
| 13 | DEPENDS += "ninja-native" | 13 | DEPENDS += "ninja-native" |
| 14 | 14 | DEPENDS += "ninja-native compiler-rt clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" | |
| 15 | LIBCPLUSPLUS = "" | 15 | LIBCPLUSPLUS = "" |
| 16 | UNWINDLIB = "" | 16 | UNWINDLIB = "" |
| 17 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 17 | 18 | ||
| 18 | COMPATIBLE_HOST_powerpc = "null" | 19 | COMPATIBLE_HOST_powerpc = "null" |
| 19 | COMPATIBLE_HOST_riscv32 = "null" | 20 | COMPATIBLE_HOST_riscv32 = "null" |
| @@ -32,6 +33,7 @@ EXTRA_OECMAKE += "\ | |||
| 32 | -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF \ | 33 | -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=OFF \ |
| 33 | -DLIBCXXABI_LIBUNWIND_INCLUDES=${S}/projects/libunwind/include \ | 34 | -DLIBCXXABI_LIBUNWIND_INCLUDES=${S}/projects/libunwind/include \ |
| 34 | -DLIBUNWIND_ENABLE_THREADS=OFF \ | 35 | -DLIBUNWIND_ENABLE_THREADS=OFF \ |
| 36 | -DLIBUNWIND_WEAK_PTHREAD_LIB=ON \ | ||
| 35 | -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON \ | 37 | -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON \ |
| 36 | -DLLVM_ENABLE_LIBCXX=ON \ | 38 | -DLLVM_ENABLE_LIBCXX=ON \ |
| 37 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/libcxxabi/include \ | 39 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${S}/libcxxabi/include \ |
