From e49949b781d9fd4930b383b7b33ad84b9a3ccc77 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Thu, 24 Mar 2022 11:53:14 +0100 Subject: [PATCH] chore: prepare-llvm-linux: fix include path order should really be `-isystem-after`, but clang ignores it...?? --- script/prepare-llvm-linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/prepare-llvm-linux.sh b/script/prepare-llvm-linux.sh index 7210b3cc8f..a261d3eac2 100755 --- a/script/prepare-llvm-linux.sh +++ b/script/prepare-llvm-linux.sh @@ -35,7 +35,7 @@ for f in $GLIBC/lib/lib{c,dl,m,rt,pthread}-*; do b=$(basename $f); cp $f stage1/ OPTIONS=() echo -n " -DLEAN_STANDALONE=ON" echo -n " -DCMAKE_CXX_COMPILER=$PWD/llvm/bin/clang++ -DLEAN_CXX_STDLIB='-Wl,-Bstatic -lc++ -lc++abi -Wl,-Bdynamic'" -echo -n " -DLEAN_EXTRA_CXX_FLAGS='--sysroot $PWD/llvm -isystem $GLIBC_DEV/include'" +echo -n " -DLEAN_EXTRA_CXX_FLAGS='--sysroot $PWD/llvm -idirafter $GLIBC_DEV/include'" echo -n " -DCMAKE_C_COMPILER=$PWD/stage1/bin/clang" # use `-nostdinc` to make sure headers are not visible by default (in particular, not to `#include_next` in the clang headers), # but do not change sysroot so users can still link against system libs