summaryrefslogtreecommitdiff
path: root/dev-util/electron/files/chromium-lto-fixes-r1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/electron/files/chromium-lto-fixes-r1.patch')
-rw-r--r--dev-util/electron/files/chromium-lto-fixes-r1.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-util/electron/files/chromium-lto-fixes-r1.patch b/dev-util/electron/files/chromium-lto-fixes-r1.patch
new file mode 100644
index 000000000000..b8bd8558b520
--- /dev/null
+++ b/dev-util/electron/files/chromium-lto-fixes-r1.patch
@@ -0,0 +1,36 @@
+diff --git a/build/common.gypi.orig b/build/common.gypi
+index cce7b3c..3b905c0 100644
+--- a/build/common.gypi.orig
++++ b/build/common.gypi
+@@ -6096,7 +6096,7 @@
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'ldflags': [
+- '-flto=32',
++ '-flto=4'
+ ],
+ }],
+ ],
+@@ -6248,7 +6248,7 @@
+ },
+ }],
+ # TODO(pcc): Make these flags work correctly with CFI.
+- ['use_lto!=0 and cfi_vptr==0', {
++ ['use_lto!=0 and cfi_vptr==0 and clang==1', {
+ 'target_defaults': {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+
+diff --git a/build/android/disable_gcc_lto.gypi.orig b/build/android/disable_gcc_lto.gypi
+index a733c7a..57570f8 100644
+--- a/build/android/disable_gcc_lto.gypi.orig
++++ b/build/android/disable_gcc_lto.gypi
+@@ -8,7 +8,7 @@
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'conditions': [
+- ['OS=="android" and clang==0 and (use_lto==1 or use_lto_o2==1)', {
++ ['(OS=="android" or OS=="linux") and clang==0 and (use_lto==1 or use_lto_o2==1)', {
+ 'cflags!': [
+ '-flto',
+ '-ffat-lto-objects',