2022-03-18 15:41:41 +00:00
|
|
|
Index: electron-17.1.0/build/config/BUILDCONFIG.gn
|
2021-06-29 20:42:56 +00:00
|
|
|
===================================================================
|
2022-03-18 15:41:41 +00:00
|
|
|
--- electron-17.1.0.orig/build/config/BUILDCONFIG.gn 2022-03-07 17:38:24.389172130 +0100
|
|
|
|
|
+++ electron-17.1.0/build/config/BUILDCONFIG.gn 2022-03-09 08:25:02.246701706 +0100
|
|
|
|
|
@@ -138,6 +138,8 @@ declare_args() {
|
|
|
|
|
# set "is_official_build" to true for any build intended to ship to end-users.
|
2021-06-29 20:42:56 +00:00
|
|
|
is_official_build = false
|
|
|
|
|
|
|
|
|
|
+ gcc_lto = false
|
|
|
|
|
+
|
|
|
|
|
# Set to true when compiling with the Clang compiler.
|
|
|
|
|
is_clang = current_os != "linux" ||
|
|
|
|
|
(current_cpu != "s390x" && current_cpu != "s390" &&
|
2022-03-18 15:41:41 +00:00
|
|
|
@@ -352,6 +354,12 @@ default_compiler_configs = [
|
2021-06-29 20:42:56 +00:00
|
|
|
"//electron/build/config:mas_build",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
+if (gcc_lto) {
|
|
|
|
|
+ default_compiler_configs += [
|
|
|
|
|
+ "//build/config/compiler:gcc_lto",
|
|
|
|
|
+ ]
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
if (is_win) {
|
|
|
|
|
default_compiler_configs += [
|
|
|
|
|
"//build/config/win:default_cfg_compiler",
|
2022-03-18 15:41:41 +00:00
|
|
|
Index: electron-17.1.0/build/config/compiler/BUILD.gn
|
2021-06-29 20:42:56 +00:00
|
|
|
===================================================================
|
2022-03-18 15:41:41 +00:00
|
|
|
--- electron-17.1.0.orig/build/config/compiler/BUILD.gn 2022-03-09 08:24:53.098851231 +0100
|
|
|
|
|
+++ electron-17.1.0/build/config/compiler/BUILD.gn 2022-03-09 08:25:02.250701641 +0100
|
|
|
|
|
@@ -1880,6 +1880,10 @@ if (is_win) {
|
2021-06-29 20:42:56 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+config("gcc_lto") {
|
|
|
|
|
+ cflags = [ "-flto" ]
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
config("default_stack_frames") {
|
|
|
|
|
if (is_posix || is_fuchsia) {
|
|
|
|
|
if (enable_frame_pointers) {
|
2022-03-18 15:41:41 +00:00
|
|
|
Index: electron-17.1.0/sandbox/linux/BUILD.gn
|
2021-06-29 20:42:56 +00:00
|
|
|
===================================================================
|
2022-03-18 15:41:41 +00:00
|
|
|
--- electron-17.1.0.orig/sandbox/linux/BUILD.gn 2022-03-07 17:20:37.288839348 +0100
|
|
|
|
|
+++ electron-17.1.0/sandbox/linux/BUILD.gn 2022-03-09 08:25:02.250701641 +0100
|
|
|
|
|
@@ -245,6 +245,9 @@ component("seccomp_bpf") {
|
2021-06-29 20:42:56 +00:00
|
|
|
"//build:chromeos_buildflags",
|
|
|
|
|
"//sandbox:sandbox_buildflags",
|
|
|
|
|
]
|
|
|
|
|
+ if (gcc_lto) {
|
|
|
|
|
+ configs -= [ "//build/config/compiler:gcc_lto" ]
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
if (is_android) {
|
|
|
|
|
sources += [
|
2022-07-04 09:07:38 +00:00
|
|
|
Index: chromium-96.0.4664.93/base/BUILD.gn
|
|
|
|
|
===================================================================
|
|
|
|
|
--- a/base/BUILD.gn
|
|
|
|
|
+++ b/base/BUILD.gn
|
|
|
|
|
@@ -1986,6 +1986,10 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (gcc_lto) {
|
|
|
|
|
+ configs -= [ "//build/config/compiler:gcc_lto" ]
|
|
|
|
|
+ }
|
2022-03-18 15:41:41 +00:00
|
|
|
+
|
2022-07-04 09:07:38 +00:00
|
|
|
if (use_partition_alloc) {
|
|
|
|
|
sources += [
|
|
|
|
|
"allocator/partition_allocator/address_pool_manager_unittest.cc",
|