Skip to content

Commit

Permalink
Revert "Remove raspi-2 -fno-exception hack. (#1490)" (#1544)
Browse files Browse the repository at this point in the history
This reverts commit 4a5738d.

Seems to be causing many raspi tests to fail.

b/219073252
  • Loading branch information
andrewsavage1 authored Sep 13, 2023
1 parent ea3d69d commit 0fcdc46
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
3 changes: 3 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1899,8 +1899,11 @@ config("no_exceptions") {
defines = [ "_HAS_EXCEPTIONS=0" ]
}
} else {
# This hack ensures raspi does not compile anything with -fno-exceptions.
if (!defined(enable_exceptions_override) || !enable_exceptions_override) {
cflags_cc = [ "-fno-exceptions" ]
cflags_objcc = cflags_cc
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion starboard/nplb/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ target(gtest_target_type, "nplb") {
"window_get_size_test.cc",
]

configs += [ "//starboard/build/config:starboard_implementation" ]
configs += [
"//build/config/compiler:exceptions",
"//starboard/build/config:starboard_implementation",
]
configs -= [ "//build/config/compiler:no_exceptions" ]

deps = [
"//starboard",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ if (current_toolchain == default_toolchain &&
speed_config_path = "//starboard/raspi/shared/platform_configuration:speed"
size_config_path = "//starboard/raspi/shared/platform_configuration:size"

# TODO(b/219073252): Enable -fno-exceptions and don't mix it with -fexceptions.
enable_exceptions_override = true

v8_enable_webassembly = true

is_raspi = true
Expand Down
16 changes: 6 additions & 10 deletions third_party/llvm-project/libcxxabi/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config("cxxabi_config") {
"-std=c++17",
"-nostdinc++",
"-fPIC",
"-fexceptions",
"-frtti",
"-Werror=return-type",
"-fvisibility-inlines-hidden",
Expand Down Expand Up @@ -64,19 +65,11 @@ static_library("cxxabi") {
"src/cxa_aux_runtime.cpp",
"src/cxa_default_handlers.cpp",
"src/cxa_demangle.cpp",

# Requires exception support
#"src/cxa_exception.cpp",

"src/cxa_exception.cpp",
"src/cxa_exception_storage.cpp",

"src/cxa_guard.cpp",
"src/cxa_handlers.cpp",
"src/cxa_noexception.cpp",

# Requires exception support
#"src/cxa_personality.cpp",

"src/cxa_personality.cpp",
"src/cxa_vector.cpp",
"src/cxa_virtual.cpp",
"src/fallback_malloc.cpp",
Expand All @@ -86,6 +79,9 @@ static_library("cxxabi") {
"src/stdlib_stdexcept.cpp",
"src/stdlib_typeinfo.cpp",

# src/cxa_noexception.cpp is omitted because this file breaks the build and
# we utilize exception handling.

# src/cxa_thread_atexit.cpp is unneeded. It introduces
# "__cxa_thread_atexit_impl" as an API leak.
]
Expand Down

0 comments on commit 0fcdc46

Please sign in to comment.