aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn16
-rw-r--r--gn/BUILD.gn8
-rw-r--r--gn/BUILDCONFIG.gn1
3 files changed, 17 insertions, 8 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 00f70d9c35..ab9d90cf69 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1119,6 +1119,9 @@ if (skia_enable_tools) {
}
executable("fuzz") {
+ if (is_skia_standalone) {
+ configs -= [ "//gn:no_exceptions" ]
+ }
sources = [
"fuzz/FilterFuzz.cpp",
"fuzz/FuzzGradients.cpp",
@@ -1143,13 +1146,12 @@ if (skia_enable_tools) {
[])
executable("pathops_unittest") {
- sources =
- pathops_tests_sources -
- [ rebase_path("tests/PathOpsSkpClipTest.cpp") ] + # alternate main
- [
- rebase_path("tests/skia_test.cpp"),
- rebase_path("tests/Test.cpp"),
- ]
+ sources = pathops_tests_sources -
+ [ rebase_path("tests/PathOpsSkpClipTest.cpp") ] +
+ [
+ rebase_path("tests/skia_test.cpp"),
+ rebase_path("tests/Test.cpp"),
+ ]
deps = [
":flags",
":gpu_tool_utils",
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index cf092a2b11..bebe3c589b 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -103,7 +103,6 @@ config("default") {
]
cflags_cc += [
"-std=c++11",
- "-fno-exceptions",
"-fno-threadsafe-statics",
"-fvisibility-inlines-hidden",
]
@@ -210,6 +209,13 @@ config("default") {
}
}
+config("no_exceptions") {
+ # Exceptions are disabled by default on Windows. (Use /EHsc to enable them.)
+ if (!is_win) {
+ cflags_cc = [ "-fno-exceptions" ]
+ }
+}
+
config("warnings") {
cflags = []
cflags_cc = []
diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn
index 12df69d3a2..9a995bb3d1 100644
--- a/gn/BUILDCONFIG.gn
+++ b/gn/BUILDCONFIG.gn
@@ -111,6 +111,7 @@ template("component") {
# Default configs
default_configs = [
"//gn:default",
+ "//gn:no_exceptions",
"//gn:no_rtti",
"//gn:warnings",
]