Skip to content

Commit abdd654

Browse files
authored
build_symbolizer.sh: Ensure libcxx include path comes first (#149431)
libc++ expects to come first in the search path, before libc. See for example: https://github.com/llvm/llvm-project/blob/main/libcxx/include/cstddef#L45 Make sure the C++ include path comes first even if custom paths to libc and other packages are passed in via the `FLAGS` variable.
1 parent 006c0c8 commit abdd654

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ ninja cxx cxxabi && ninja install-cxx install-cxxabi
120120

121121
FLAGS="${FLAGS} -fno-rtti -fno-exceptions"
122122
LLVM_CFLAGS="${FLAGS} -Wno-global-constructors"
123-
LLVM_CXXFLAGS="${LLVM_CFLAGS} -nostdinc++ -I${ZLIB_BUILD} -isystem ${LIBCXX_INSTALL}/include -isystem ${LIBCXX_INSTALL}/include/c++/v1"
123+
LLVM_CXXFLAGS="-isystem ${LIBCXX_INSTALL}/include -isystem ${LIBCXX_INSTALL}/include/c++/v1 ${LLVM_CFLAGS} -nostdinc++ -I${ZLIB_BUILD}"
124124

125125
# Build LLVM.
126126
if [[ ! -f ${LLVM_BUILD}/build.ninja ]]; then

0 commit comments

Comments
 (0)