Use --driver-mode=g++ instead of invoking clang++
This avoids needing the clang++ symlink. On platforms without symlinks (i.e. windows), clang.exe and clang++.exe are two separate but identical executables. This allows getting rid of the latter, saving size.
This commit is contained in:
1 parent
69b81a6d01
commit
ce282cdf5d
1 file changed
+3
-8
@@ -3,13 +3,8 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TARGET="$(basename $0 | sed 's/-[^-]*$//')"
|
||||
EXE=$(basename $0 | sed 's/.*-\([^-]*\)/\1/')
|
||||
case $EXE in
|
||||
clang*)
|
||||
;;
|
||||
gcc)
|
||||
EXE=clang
|
||||
;;
|
||||
g++)
|
||||
EXE=clang++
|
||||
clang++|g++)
|
||||
DRIVER_MODE=--driver-mode=g++
|
||||
;;
|
||||
esac
|
||||
ARCH=$(echo $TARGET | sed 's/-.*//')
|
||||
@@ -38,4 +33,4 @@ esac
|
||||
if [ -n "$CCACHE" ]; then
|
||||
CCACHE=ccache
|
||||
fi
|
||||
$CCACHE $DIR/$EXE -target $TARGET -rtlib=compiler-rt -stdlib=libc++ -fuse-ld=lld $ARCH_FLAGS -Qunused-arguments "$@"
|
||||
$CCACHE $DIR/clang $DRIVER_MODE -target $TARGET -rtlib=compiler-rt -stdlib=libc++ -fuse-ld=lld $ARCH_FLAGS -Qunused-arguments "$@"
|
||||
Reference in new issue
Block a user