[PATCH] D108841: Support LLVM_ENABLE_PER_TARGET_RUNTIME_DIR in the sanitizer symbolizer build.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 13:39:10 PDT 2021
eugenis created this revision.
eugenis added reviewers: MaskRay, vitalybuka.
eugenis requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108841
Files:
compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
Index: compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
===================================================================
--- compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
+++ compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
@@ -71,6 +71,7 @@
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 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108841.369173.patch
Type: text/x-patch
Size: 950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210827/9482bd49/attachment.bin>
More information about the llvm-commits
mailing list