Dwarf is also the default in clang on i686, but libunwind currently has an issue relating to unwinding dwarf exceptions on i686 on windows (and less easily reproducible on other platforms), see https://reviews.llvm.org/D38680. This enables exceptions on aarch64, where they previously were avoided/disabled. When linking to a statically linked libunwind with support for dwarf, one (currently) has to link in -lpsapi.
16 lines
499 B
Bash
Executable File
16 lines
499 B
Bash
Executable File
#!/usr/bin/env bash
|
|
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
|
|
ARCH=$(echo $TARGET | sed 's/-.*//')
|
|
case $ARCH in
|
|
i686|x86_64)
|
|
EH_FLAG=-fsjlj-exceptions
|
|
;;
|
|
armv7|aarch64)
|
|
EH_FLAG=
|
|
;;
|
|
esac
|
|
$DIR/$EXE -target $TARGET -rtlib=compiler-rt -stdlib=libc++ -fuse-ld=lld $EH_FLAG -Qunused-arguments "$@"
|