[compiler-rt] f89ebe1 - Support LLVM_ENABLE_PER_TARGET_RUNTIME_DIR in the sanitizer symbolizer build.
Evgenii Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 13:50:28 PDT 2021
Author: Evgenii Stepanov
Date: 2021-08-27T13:50:19-07:00
New Revision: f89ebe108e6f316a7ef293869e420491992b84cc
URL: https://github.com/llvm/llvm-project/commit/f89ebe108e6f316a7ef293869e420491992b84cc
DIFF: https://github.com/llvm/llvm-project/commit/f89ebe108e6f316a7ef293869e420491992b84cc.diff
LOG: Support LLVM_ENABLE_PER_TARGET_RUNTIME_DIR in the sanitizer symbolizer build.
In this mode libc++ headers end up in two directories:
* include/<triple>/c++/v1 for the site config header
* include/c++/v1 for everything else
Also switch from -I to -isystem.
Differential Revision: https://reviews.llvm.org/D108841
Added:
Modified:
compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
index c793875db0990..215443bd33186 100755
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
@@ -71,6 +71,7 @@ TBLGEN=$CLANG_DIR/llvm-tblgen
OPT=$CLANG_DIR/opt
export AR=$CLANG_DIR/llvm-ar
export LINK=$CLANG_DIR/llvm-link
+TARGET_TRIPLE=$($CC -print-target-triple)
for F in $CC $CXX $TBLGEN $LINK $OPT $AR; do
if [[ ! -x "$F" ]]; then
@@ -123,7 +124,7 @@ cd ${LIBCXX_BUILD}
ninja cxx cxxabi
FLAGS="${FLAGS} -fno-rtti -fno-exceptions"
-LLVM_FLAGS="${FLAGS} -nostdinc++ -I${ZLIB_BUILD} -I${LIBCXX_BUILD}/include/c++/v1 -Wno-error=global-constructors"
+LLVM_FLAGS="${FLAGS} -nostdinc++ -I${ZLIB_BUILD} -isystem ${LIBCXX_BUILD}/include/${TARGET_TRIPLE}/c++/v1 -isystem ${LIBCXX_BUILD}/include/c++/v1 -Wno-error=global-constructors"
# Build LLVM.
if [[ ! -d ${LLVM_BUILD} ]]; then
More information about the llvm-commits
mailing list