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/-[^-]*$//')"
|
TARGET="$(basename $0 | sed 's/-[^-]*$//')"
|
||||||
EXE=$(basename $0 | sed 's/.*-\([^-]*\)/\1/')
|
EXE=$(basename $0 | sed 's/.*-\([^-]*\)/\1/')
|
||||||
case $EXE in
|
case $EXE in
|
||||||
clang*)
|
clang++|g++)
|
||||||
;;
|
DRIVER_MODE=--driver-mode=g++
|
||||||
gcc)
|
|
||||||
EXE=clang
|
|
||||||
;;
|
|
||||||
g++)
|
|
||||||
EXE=clang++
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
ARCH=$(echo $TARGET | sed 's/-.*//')
|
ARCH=$(echo $TARGET | sed 's/-.*//')
|
||||||
@@ -38,4 +33,4 @@ esac
|
|||||||
if [ -n "$CCACHE" ]; then
|
if [ -n "$CCACHE" ]; then
|
||||||
CCACHE=ccache
|
CCACHE=ccache
|
||||||
fi
|
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