GN: spin off :no_exceptions as its own config.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4001
Change-Id: Ibaa10b9b6f566958b7e6622eedbc30a7010260b3
Reviewed-on: https://skia-review.googlesource.com/4001
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index cf092a2..bebe3c5 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -103,7 +103,6 @@
]
cflags_cc += [
"-std=c++11",
- "-fno-exceptions",
"-fno-threadsafe-statics",
"-fvisibility-inlines-hidden",
]
@@ -210,6 +209,13 @@
}
}
+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 = []