Files
llvm-mingw/wrappers/clang-target-wrapper
T
Martin Storsjö 03f1fd6c65 Use dwarf exceptions on armv7 and aarch64
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.
2017-11-28 18:06:46 +02:00

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 "$@"