From b580080af1ca854dc57d53d5ebba53ae33bf1d9f Mon Sep 17 00:00:00 2001 From: Trung Nguyen <57174311+trungnt2910@users.noreply.github.com> Date: Mon, 8 Jan 2024 23:47:53 +0700 Subject: [PATCH] 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 --- tool/cosmocc/bin/cosmocc | 2 -- tool/cosmocc/bin/cosmocross | 2 -- 2 files changed, 4 deletions(-) diff --git a/tool/cosmocc/bin/cosmocc b/tool/cosmocc/bin/cosmocc index 4cd6b2450..97ceaf18c 100755 --- a/tool/cosmocc/bin/cosmocc +++ b/tool/cosmocc/bin/cosmocc @@ -151,11 +151,9 @@ for x; do elif [ x"$x" = x"-r" ] || [ x"$x" = x"-S" ] || [ x"$x" = x"-pie" ] || - [ x"$x" = x"-frtti" ] || [ x"$x" = x"-shared" ] || [ x"$x" = x"-nostdlib" ] || [ x"$x" = x"-mred-zone" ] || - [ x"$x" = x"-fexceptions" ] || [ x"$x" = x"-fsanitize=thread" ]; then fatal_error "$x flag not supported" elif [ x"$x" = x"-mno-red-zone" ]; then diff --git a/tool/cosmocc/bin/cosmocross b/tool/cosmocc/bin/cosmocross index e597c8d75..f906393f3 100755 --- a/tool/cosmocc/bin/cosmocross +++ b/tool/cosmocc/bin/cosmocross @@ -142,11 +142,9 @@ for x; do continue elif [ x"$x" = x"-r" ] || [ x"$x" = x"-pie" ] || - [ x"$x" = x"-frtti" ] || [ x"$x" = x"-shared" ] || [ x"$x" = x"-nostdlib" ] || [ x"$x" = x"-mred-zone" ] || - [ x"$x" = x"-fexceptions" ] || [ x"$x" = x"-fsanitize=thread" ]; then echo "$PROG: $x not supported" >&2 exit 1