Set the flags for exception handling model in the clang wrapper
This commit is contained in:
1 parent
d4dbd66d2e
commit
2cb6a8d390
2 files changed
+13
-10
No files matched your search
@@ -3,4 +3,13 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
TARGET="$(basename $0 | sed 's/-clang.*//')"
|
||||
EXE=$(basename $0 | sed 's/.*-\(clang.*\)/\1/')
|
||||
# We could set these defaults in the clang frontend driver, but that's not yet merged upstream
|
||||
$DIR/$EXE -target $TARGET -rtlib=compiler-rt -stdlib=libc++ -fuse-ld=lld -Qunused-arguments "$@"
|
||||
ARCH=$(echo $TARGET | sed 's/-.*//')
|
||||
case $ARCH in
|
||||
i686|x86_64|armv7)
|
||||
EH_FLAG=-fsjlj-exceptions
|
||||
;;
|
||||
aarch64)
|
||||
EH_FLAG=-fno-exceptions
|
||||
;;
|
||||
esac
|
||||
$DIR/$EXE -target $TARGET -rtlib=compiler-rt -stdlib=libc++ -fuse-ld=lld $EH_FLAG -Qunused-arguments "$@"
|
||||
Reference in new issue
Block a user