summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-09-30 10:34:07 -0700
committerKhem Raj <raj.khem@gmail.com>2019-10-01 15:58:36 -0700
commitbfa67c067f749e6cc9c0733a03207fb77d4e175f (patch)
treeb7d0bd732190c9aec774aff9ce237ec4cf5fa621
parent8f454e7d3fb185f369b6f33ccd7827bb688600c4 (diff)
downloadmeta-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.bbclass14
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb4
-rw-r--r--recipes-devtools/clang/libcxx_git.bb3
-rw-r--r--recipes-devtools/clang/llvm-libunwind.bb4
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
63def clang_dep_prepend(d): 63def 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
80def clang_remove_deps(d): 80def 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
86BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_dep_prepend(d)}" 86def clang_add_deps(d):
87DEPENDS_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
91BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_base_deps(d)}"
92DEPENDS_remove_class-target = "${@clang_remove_deps(d)}"
93BASE_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 = ""
17COMPILER_RT = "" 17COMPILER_RT = ""
18TUNE_CCARGS_remove = "-no-integrated-as" 18TUNE_CCARGS_remove = "-no-integrated-as"
19 19
20DEPENDS += "ninja-native" 20INHIBIT_DEFAULT_DEPS = "1"
21
22DEPENDS += "ninja-native clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs"
21DEPENDS_append_class-nativesdk = " clang-native" 23DEPENDS_append_class-nativesdk = " clang-native"
22 24
23THUMB_TUNE_CCARGS = "" 25THUMB_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
11inherit cmake pythonnative 11inherit cmake pythonnative
12 12
13DEPENDS += "ninja-native" 13DEPENDS += "ninja-native"
14DEPENDS += "ninja-native compiler-rt clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs llvm-libunwind"
14 15
15LIBCPLUSPLUS = "" 16LIBCPLUSPLUS = ""
16 17
18INHIBIT_DEFAULT_DEPS = "1"
19
17LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ 20LIC_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
11inherit cmake pythonnative 11inherit cmake pythonnative
12 12
13DEPENDS += "ninja-native" 13DEPENDS += "ninja-native"
14 14DEPENDS += "ninja-native compiler-rt clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs"
15LIBCPLUSPLUS = "" 15LIBCPLUSPLUS = ""
16UNWINDLIB = "" 16UNWINDLIB = ""
17INHIBIT_DEFAULT_DEPS = "1"
17 18
18COMPATIBLE_HOST_powerpc = "null" 19COMPATIBLE_HOST_powerpc = "null"
19COMPATIBLE_HOST_riscv32 = "null" 20COMPATIBLE_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 \