From 154a4444c65d9e2a42a0f05118b37e1a22774b9e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 26 May 2021 11:35:02 -0700 Subject: compiler-rt-sanitizers: Use packageconfig to use static libcxx sanitizers can link libc++/libc++abi statically or dynamically, we default to use dynamic version but leave the option to enable static linking if so needed Use virtual/crypt to represent crypt implementation which becomes libc independent Fix dependencies for native recipes Signed-off-by: Khem Raj (cherry picked from commit f4bb299c409128801e68c30187381fadeb0a451d) --- recipes-devtools/clang/compiler-rt-sanitizers_git.bb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index f1327de..38558d7 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -15,14 +15,13 @@ LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee TUNE_CCARGS_remove = "-no-integrated-as" -RUNTIME = "llvm" - -DEPENDS += "ninja-native clang-cross-${TARGET_ARCH} virtual/${MLPREFIX}libc virtual/${TARGET_PREFIX}compilerlibs" -DEPENDS_append_libc-glibc = " libxcrypt" +DEPENDS += "ninja-native virtual/crypt" +DEPENDS_append_class-native = " clang-native libxcrypt-native" DEPENDS_append_class-nativesdk = " clang-native nativesdk-libxcrypt" PACKAGECONFIG ??= "" PACKAGECONFIG[crt] = "-DCOMPILER_RT_BUILD_CRT:BOOL=ON,-DCOMPILER_RT_BUILD_CRT:BOOL=OFF" +PACKAGECONFIG[static-libcxx] = "-DSANITIZER_USE_STATIC_CXX_ABI=ON -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON,," HF = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" HF[vardepvalue] = "${HF}" @@ -34,8 +33,6 @@ EXTRA_OECMAKE += "-DCOMPILER_RT_STANDALONE_BUILD=OFF \ -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=${HOST_ARCH}${HF}${HOST_VENDOR}-${HOST_OS} \ -DCOMPILER_RT_BUILD_BUILTINS=OFF \ -DSANITIZER_CXX_ABI_LIBNAME=${@bb.utils.contains("RUNTIME", "llvm", "libc++", "libstdc++", d)} \ - -DSANITIZER_USE_STATIC_CXX_ABI=ON \ - -DSANITIZER_USE_STATIC_LLVM_UNWINDER=ON \ -DCOMPILER_RT_BUILD_XRAY=ON \ -DCOMPILER_RT_BUILD_SANITIZERS=ON \ -DCOMPILER_RT_BUILD_LIBFUZZER=ON \ -- cgit v1.2.3-54-g00ecf