39baf68790
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ales Pergl <alpergl@microsoft.com>
|
|
Date: Thu, 20 Sep 2018 17:44:29 -0700
|
|
Subject: build_gn.patch
|
|
|
|
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.
|
|
|
|
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
|
index 11e0a21820f34ac99bc2e9322e0c8bd1314045c3..5301eb0b4d7947c5e797d3ba8973a3ac5ff653f3 100644
|
|
--- a/build/config/BUILDCONFIG.gn
|
|
+++ b/build/config/BUILDCONFIG.gn
|
|
@@ -123,6 +123,9 @@ if (current_os == "") {
|
|
# 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
|
|
@@ -439,6 +442,7 @@ default_compiler_configs = [
|
|
"//build/config/compiler/pgo:default_pgo_flags",
|
|
"//build/config/coverage:default_coverage",
|
|
"//build/config/sanitizers:default_sanitizer_flags",
|
|
+ "//electron/build/config:mas_build",
|
|
]
|
|
|
|
if (is_win) {
|