2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Ales Pergl <alpergl@microsoft.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:44:29 -0700
|
|
|
|
Subject: build_gn.patch
|
|
|
|
|
2019-12-13 17:18:45 +00:00
|
|
|
These are variables we add to the root BUILDCONFIG so that they're available
|
|
|
|
everywhere, without having to import("//electron/.../flags.gni").
|
|
|
|
|
|
|
|
Additionally, we add the `:mas_build` config to every compiled file so that
|
|
|
|
the `MAS_BUILD` #define is available everywhere. This produces fewer patch
|
|
|
|
conflicts when upgrading than it would if we added a specific config dependency
|
|
|
|
only to those targets which had MAS_BUILD-relevant content in them. The
|
|
|
|
tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
|
|
|
|
rebuild the entire tree.
|
2018-09-21 00:30:26 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
2023-03-10 16:07:42 +00:00
|
|
|
index 1fa42b1b1b0e0e467dbe6fb6f82da77e4c494f0f..68d467f75faa3fddd385632b536373bd9167d881 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
|
2022-10-27 16:37:04 +00:00
|
|
|
@@ -352,6 +355,7 @@ default_compiler_configs = [
|
2020-03-03 21:35:05 +00:00
|
|
|
"//build/config/compiler/pgo:default_pgo_flags",
|
2018-09-14 05:02:16 +00:00
|
|
|
"//build/config/coverage:default_coverage",
|
|
|
|
"//build/config/sanitizers:default_sanitizer_flags",
|
|
|
|
+ "//electron/build/config:mas_build",
|
|
|
|
]
|
|
|
|
|
|
|
|
if (is_win) {
|