tool/cosmocc: Allow exceptions and rtti (#1074)

With `libunwind` and `libcxxabi` included in `libcosmo`, we can now
allow users to build C++ applications with exceptions and RTTI enabled.

The default is still disabling these two to avoid bloating the binary.

Closes #1065
This commit is contained in:
Trung Nguyen 2024-01-08 23:47:53 +07:00 committed by GitHub
parent 8b33204f37
commit b580080af1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 4 deletions

View file

@ -151,11 +151,9 @@ for x; do
elif [ x"$x" = x"-r" ] || elif [ x"$x" = x"-r" ] ||
[ x"$x" = x"-S" ] || [ x"$x" = x"-S" ] ||
[ x"$x" = x"-pie" ] || [ x"$x" = x"-pie" ] ||
[ x"$x" = x"-frtti" ] ||
[ x"$x" = x"-shared" ] || [ x"$x" = x"-shared" ] ||
[ x"$x" = x"-nostdlib" ] || [ x"$x" = x"-nostdlib" ] ||
[ x"$x" = x"-mred-zone" ] || [ x"$x" = x"-mred-zone" ] ||
[ x"$x" = x"-fexceptions" ] ||
[ x"$x" = x"-fsanitize=thread" ]; then [ x"$x" = x"-fsanitize=thread" ]; then
fatal_error "$x flag not supported" fatal_error "$x flag not supported"
elif [ x"$x" = x"-mno-red-zone" ]; then elif [ x"$x" = x"-mno-red-zone" ]; then

View file

@ -142,11 +142,9 @@ for x; do
continue continue
elif [ x"$x" = x"-r" ] || elif [ x"$x" = x"-r" ] ||
[ x"$x" = x"-pie" ] || [ x"$x" = x"-pie" ] ||
[ x"$x" = x"-frtti" ] ||
[ x"$x" = x"-shared" ] || [ x"$x" = x"-shared" ] ||
[ x"$x" = x"-nostdlib" ] || [ x"$x" = x"-nostdlib" ] ||
[ x"$x" = x"-mred-zone" ] || [ x"$x" = x"-mred-zone" ] ||
[ x"$x" = x"-fexceptions" ] ||
[ x"$x" = x"-fsanitize=thread" ]; then [ x"$x" = x"-fsanitize=thread" ]; then
echo "$PROG: $x not supported" >&2 echo "$PROG: $x not supported" >&2
exit 1 exit 1