aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-08-15 21:16:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-16 01:49:07 +0000
commitc667dff58dc4b16faf30c34e98a118c6a1c1f987 (patch)
treeb1b8bd77c302c131d7205b11bf3ef8796017cf20 /gn
parentecf78acaa0d5319adf575e6f624993b16d83824c (diff)
Turn on exceptions in test tools.
This allows us to test things that, e.g., throw std::bad_alloc. Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68 Reviewed-on: https://skia-review.googlesource.com/34982 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gn')
-rw-r--r--gn/BUILD.gn7
-rw-r--r--gn/tests.gni1
2 files changed, 7 insertions, 1 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 7be1617d23..06cff4e4a7 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -258,11 +258,16 @@ config("default") {
}
config("no_exceptions") {
- # Exceptions are disabled by default on Windows. (Use /EHsc to enable them.)
+ # Exceptions are disabled by default on Windows. (Use :yes_exceptions to enable them.)
if (!is_win) {
cflags_cc = [ "-fno-exceptions" ]
}
}
+config("yes_exceptions") {
+ if (is_win) {
+ cflags_cc = [ "/EHsc" ]
+ }
+}
config("warnings") {
cflags = []
diff --git a/gn/tests.gni b/gn/tests.gni
index c2f3759cd2..51d1d08ce7 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -62,6 +62,7 @@ tests_sources = [
"$_tests/EGLImageTest.cpp",
"$_tests/EmptyPathTest.cpp",
"$_tests/EncodeTest.cpp",
+ "$_tests/ExceptionTest.cpp",
"$_tests/ExifTest.cpp",
"$_tests/F16StagesTest.cpp",
"$_tests/FillPathTest.cpp",