[vm] Avoid using -fno-exceptions globally in GN builds.

Right now `-fno-exception` will be in `cflags` for every executable.
That prevents adding & building 3rd party `DEPS` that may use
exceptions.

So we'll remove `-fno-exceptions` from global configurations and rely on
the fact that the `dart_config` GN config already has `-fno-exceptions`
in it's `cflags`.

TEST=ci

Change-Id: I8be9d7341a9c88f29cdf6dfbf32db70c7f78a9bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270403
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Martin Kustermann 2022-11-18 09:42:48 +00:00 committed by Commit Queue
parent 81551c4465
commit 70656411b1
2 changed files with 2 additions and 7 deletions

View file

@ -249,10 +249,7 @@ if (is_win) {
]
}
if (is_posix) {
_native_compiler_configs += [
"//build/config/gcc:no_exceptions",
"//build/config/gcc:relative_paths",
]
_native_compiler_configs += [ "//build/config/gcc:relative_paths" ]
if (is_product) {
_native_compiler_configs +=
[ "//build/config/gcc:symbol_visibility_hidden" ]

View file

@ -152,7 +152,7 @@ config("compiler") {
# ----------------------------------
if (is_mac) {
# These flags are shared between the C compiler and linker.
common_mac_flags = [ "-fno-exceptions" ]
common_mac_flags = []
# CPU architecture.
if (current_cpu == "x64") {
@ -234,8 +234,6 @@ config("compiler") {
]
}
}
cflags += [ "-fno-exceptions" ]
}
# Linux/Android common flags setup.