2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
2018-09-14 18:03:43 +00:00
|
|
|
index 93a97ff2803f..02c469e930a1 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/build/config/BUILDCONFIG.gn
|
|
|
|
+++ b/build/config/BUILDCONFIG.gn
|
2018-09-15 11:40:18 +00:00
|
|
|
@@ -123,6 +123,9 @@ if (current_os == "") {
|
2018-09-14 05:02:16 +00:00
|
|
|
# even if the value is overridden, which is wasteful. See first bullet.
|
|
|
|
|
|
|
|
declare_args() {
|
|
|
|
+ is_electron_build = false
|
|
|
|
+ is_mas_build = false
|
|
|
|
+
|
|
|
|
# Set to enable the official build level of optimization. This has nothing
|
|
|
|
# to do with branding, but enables an additional level of optimization above
|
|
|
|
# release (!is_debug). This might be better expressed as a tri-state
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -527,6 +531,7 @@ default_compiler_configs = [
|
2018-09-14 05:02:16 +00:00
|
|
|
"//build/config/compiler:thin_archive",
|
|
|
|
"//build/config/coverage:default_coverage",
|
|
|
|
"//build/config/sanitizers:default_sanitizer_flags",
|
|
|
|
+ "//electron/build/config:mas_build",
|
|
|
|
]
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
2018-09-14 18:03:43 +00:00
|
|
|
index 83337d52e4b9..8ec56ca46c74 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/build/config/compiler/BUILD.gn
|
|
|
|
+++ b/build/config/compiler/BUILD.gn
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -636,10 +636,13 @@ config("compiler") {
|
2018-09-14 05:02:16 +00:00
|
|
|
ldflags += [ "-Wl,--lto-O0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
- cflags += [ "-fwhole-program-vtables" ]
|
|
|
|
- if (!is_win) {
|
|
|
|
- ldflags += [ "-fwhole-program-vtables" ]
|
|
|
|
- }
|
|
|
|
+ # -fwhole-program-vtables doesn't work well in Electron right now, as it's
|
|
|
|
+ # not a single binary and the optimizations break interfaces used across
|
|
|
|
+ # binary boundaries.
|
|
|
|
+ # cflags += [ "-fwhole-program-vtables" ]
|
|
|
|
+ # if (!is_win) {
|
|
|
|
+ # ldflags += [ "-fwhole-program-vtables" ]
|
|
|
|
+ #}
|
|
|
|
|
|
|
|
# Work-around for http://openradar.appspot.com/20356002
|
|
|
|
if (is_mac) {
|