Skip to content

Commit 64b0c3d

Browse files
Add enable_exceptions compile configuration. (flutter#686)
This is needed for binaryen targets, some of which will be built soon as part of the dart sdk build.
1 parent 370d059 commit 64b0c3d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build/config/compiler/BUILD.gn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,15 @@ config("no_rtti") {
766766
}
767767
}
768768

769+
config("enable_exceptions") {
770+
if (is_win) {
771+
cflags_cc = [ "/EHsc" ]
772+
defines = [ "_HAS_EXCEPTIONS=1" ]
773+
} else if (is_clang) {
774+
cflags_cc = [ "-fexceptions" ]
775+
}
776+
}
777+
769778
# Warnings ---------------------------------------------------------------------
770779

771780
# On Windows compiling on x64, VC will issue a warning when converting

0 commit comments

Comments
 (0)