summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-09-27 18:04:47 -0700
committerKhem Raj <raj.khem@gmail.com>2019-09-28 16:55:57 -0700
commit3ae77709d22d2f608f1984a73386067d4dcdaea0 (patch)
treea70cdc62e74c96f9103cac3ef170f3052ef87e39
parentf281ae2887cad78129266a9e697352b13c5e11da (diff)
downloadmeta-clang-3ae77709d22d2f608f1984a73386067d4dcdaea0.tar.gz
runtime: Automatically add llvm-libunwind based on COMPILER_RT asking for --unwindlib=libunwind
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--classes/clang.bbclass8
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb7
-rw-r--r--recipes-devtools/clang/libcxx_git.bb12
-rw-r--r--recipes-devtools/clang/llvm-libunwind.bb6
4 files changed, 9 insertions, 24 deletions
diff --git a/classes/clang.bbclass b/classes/clang.bbclass
index 58fe6b6..6d99b45 100644
--- a/classes/clang.bbclass
+++ b/classes/clang.bbclass
@@ -68,6 +68,8 @@ def clang_dep_prepend(d):
68 ret += " compiler-rt " 68 ret += " compiler-rt "
69 else: 69 else:
70 ret += " libgcc " 70 ret += " libgcc "
71 if (d.getVar('COMPILER_RT').find('--unwindlib=libunwind') != -1):
72 ret += " llvm-libunwind "
71 if (d.getVar('LIBCPLUSPLUS').find('--stdlib=libc++') != -1): 73 if (d.getVar('LIBCPLUSPLUS').find('--stdlib=libc++') != -1):
72 ret += " libcxx " 74 ret += " libcxx "
73 else: 75 else:
@@ -76,9 +78,3 @@ def clang_dep_prepend(d):
76 return "" 78 return ""
77 79
78BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_dep_prepend(d)}" 80BASE_DEFAULT_DEPS_toolchain-clang_class-target = "${@clang_dep_prepend(d)}"
79
80PREFERRED_PROVIDER_libunwind_toolchain-clang = "llvm-libunwind"
81PREFERRED_PROVIDER_libunwind ?= "libunwind"
82PREFERRED_PROVIDER_libunwind_powerpc = "libunwind"
83PREFERRED_PROVIDER_libunwind_riscv32 = "libunwind"
84PREFERRED_PROVIDER_libunwind_riscv64 = "libunwind"
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index d6ce083..c24329c 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -13,11 +13,10 @@ inherit cmake pkgconfig pythonnative
13 13
14LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a" 14LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a"
15 15
16BASEDEPENDS_remove_toolchain-clang_class-target = "compiler-rt libcxx" 16LIBCPLUSPLUS = ""
17DEPENDS_append_toolchain-clang_class-target = " virtual/${TARGET_PREFIX}compilerlibs" 17COMPILER_RT = ""
18TARGET_CXXFLAGS_remove_toolchain-clang = "--stdlib=libc++"
19TUNE_CCARGS_remove_toolchain-clang = "--rtlib=compiler-rt --unwindlib=libunwind --stdlib=libc++"
20TUNE_CCARGS_remove = "-no-integrated-as" 18TUNE_CCARGS_remove = "-no-integrated-as"
19
21DEPENDS += "ninja-native" 20DEPENDS += "ninja-native"
22DEPENDS_append_class-nativesdk = " clang-native" 21DEPENDS_append_class-nativesdk = " clang-native"
23 22
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb
index c12831a..6d94ac4 100644
--- a/recipes-devtools/clang/libcxx_git.bb
+++ b/recipes-devtools/clang/libcxx_git.bb
@@ -10,17 +10,9 @@ require common-source.inc
10 10
11inherit cmake pythonnative 11inherit cmake pythonnative
12 12
13DEPENDS += "ninja-native llvm-libunwind" 13DEPENDS += "ninja-native"
14 14
15DEPENDS_remove_powerpc = "llvm-libunwind" 15LIBCPLUSPLUS = ""
16DEPENDS_remove_riscv32 = "llvm-libunwind"
17DEPENDS_remove_riscv64 = "llvm-libunwind"
18
19BASEDEPENDS_remove_toolchain-clang = "libcxx"
20DEPENDS_append_toolchain-clang = " virtual/${TARGET_PREFIX}compilerlibs"
21
22TARGET_CXXFLAGS_remove_toolchain-clang = "--stdlib=libc++"
23TUNE_CCARGS_remove_toolchain-clang = "--stdlib=libc++"
24 16
25LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \ 17LIC_FILES_CHKSUM = "file://libcxx/LICENSE.TXT;md5=55d89dd7eec8d3b4204b680e27da3953 \
26 file://libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \ 18 file://libcxxabi/LICENSE.TXT;md5=7b9334635b542c56868400a46b272b1e \
diff --git a/recipes-devtools/clang/llvm-libunwind.bb b/recipes-devtools/clang/llvm-libunwind.bb
index eb46e11..1bcad96 100644
--- a/recipes-devtools/clang/llvm-libunwind.bb
+++ b/recipes-devtools/clang/llvm-libunwind.bb
@@ -13,11 +13,9 @@ inherit cmake pythonnative
13PROVIDES += "libunwind" 13PROVIDES += "libunwind"
14 14
15DEPENDS += "ninja-native" 15DEPENDS += "ninja-native"
16BASEDEPENDS_remove_toolchain-clang = "libcxx"
17DEPENDS_append_toolchain-clang = " virtual/${TARGET_PREFIX}compilerlibs"
18 16
19TARGET_CXXFLAGS_remove_toolchain-clang = "--stdlib=libc++" 17LIBCPLUSPLUS = ""
20TUNE_CCARGS_remove_toolchain-clang = "--unwindlib=libunwind --stdlib=libc++" 18UNWINDLIB = ""
21 19
22COMPATIBLE_HOST_powerpc = "null" 20COMPATIBLE_HOST_powerpc = "null"
23COMPATIBLE_HOST_riscv32 = "null" 21COMPATIBLE_HOST_riscv32 = "null"