Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index eb33be96e6e438fa28808b6a73a717542d76fdd9..4520f3aef2056534e5cca154ca5d2a16d7c22420 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -43,10 +43,14 @@ config("compiler") { |
cflags += [ |
"/Gy", # Enable function-level linking. |
"/GS", # Enable buffer security checking. |
- "/EHsc", # Assume C functions can't throw exceptions and don't catch |
- # structured exceptions (only C++ ones). |
"/FS", # Preserve previous PDB behavior. |
] |
+ if (is_component_build) { |
+ cflags += [ |
+ "/EHsc", # Assume C functions can't throw exceptions and don't catch |
+ # structured exceptions (only C++ ones). |
+ ] |
+ } |
} else { |
# Common GCC compiler flags setup. |
# -------------------------------- |