cc-wrapper: revert change to -isystem
This commit is contained in:
parent
ee2b2cef35
commit
b59d61aa48
@ -366,14 +366,14 @@ stdenv.mkDerivation {
|
||||
''
|
||||
+ optionalString (libcxx == null && (useGccForLibs && gccForLibs.langCC or false)) ''
|
||||
for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*; do
|
||||
echo "-cxx-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
done
|
||||
for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*/${targetPlatform.config}; do
|
||||
echo "-cxx-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
done
|
||||
''
|
||||
+ optionalString (libcxx.isLLVM or false) ''
|
||||
echo "-cxx-isystem ${lib.getDev libcxx}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-isystem ${lib.getDev libcxx}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-stdlib=libc++" >> $out/nix-support/libcxx-ldflags
|
||||
echo "-l${libcxx.cxxabi.libName}" >> $out/nix-support/libcxx-ldflags
|
||||
''
|
||||
|
@ -18,31 +18,9 @@ buildcpath() {
|
||||
echo $path${after:+':'}$after
|
||||
}
|
||||
|
||||
buildcxxpath() {
|
||||
local path after
|
||||
while (( $# )); do
|
||||
case $1 in
|
||||
-isystem)
|
||||
shift
|
||||
path=$path${path:+':'}$1
|
||||
;;
|
||||
-cxx-isystem)
|
||||
shift
|
||||
path=$path${path:+':'}$1
|
||||
;;
|
||||
-idirafter)
|
||||
shift
|
||||
after=$after${after:+':'}$1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
echo $path${after:+':'}$after
|
||||
}
|
||||
|
||||
export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
||||
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
||||
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcxxpath ${NIX_CFLAGS_COMPILE} \
|
||||
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
|
||||
$(<@clang@/nix-support/libcxx-cxxflags) \
|
||||
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user