summarylogtreecommitdiffstats
path: root/REVERT-disable-autoupgrading-debug-info.patch
diff options
context:
space:
mode:
authorJustKidding2023-06-04 16:59:35 -0500
committerJustKidding2023-06-04 16:59:35 -0500
commitdd84f58ba091eafbfbecf0ebbc056fdcfb3a75e9 (patch)
tree65cc5adf3646cbb319de5e4904b103212d82a988 /REVERT-disable-autoupgrading-debug-info.patch
parent30a4576edfbc783eb9f39664b7a7ada553cccc51 (diff)
downloadaur-dd84f58ba091eafbfbecf0ebbc056fdcfb3a75e9.tar.gz
upgpkg: ungoogled-chromium 114.0.5735.90-1
upstream release
Diffstat (limited to 'REVERT-disable-autoupgrading-debug-info.patch')
-rw-r--r--REVERT-disable-autoupgrading-debug-info.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/REVERT-disable-autoupgrading-debug-info.patch b/REVERT-disable-autoupgrading-debug-info.patch
new file mode 100644
index 000000000000..a60db7ee6d2f
--- /dev/null
+++ b/REVERT-disable-autoupgrading-debug-info.patch
@@ -0,0 +1,49 @@
+From 54969766fd2029c506befc46e9ce14d67c7ed02a Mon Sep 17 00:00:00 2001
+From: Arthur Eubanks <aeubanks@google.com>
+Date: Tue, 25 Apr 2023 03:05:19 +0000
+Subject: [PATCH] Reland [clang] Disable autoupgrading debug info in ThinLTO
+ builds
+
+ThinLTO reads bitcode many times and attempts to upgrade the debug info every time. This is expensive since it calls the verifier. We don't need this given all LLVM bitcode producers are from the same version of LLVM.
+
+For just the build step that runs ThinLTO and links official Chrome, measured 34T -> 32T instructions via perf stat.
+
+Reland disables adding flag for ChromeOS since that toolchain is too old to have this flag.
+
+Bug: 972449
+Change-Id: I44552dd6c9dc71683c002d0c885e78b2a4341659
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4470209
+Reviewed-by: Nico Weber <thakis@chromium.org>
+Commit-Queue: Arthur Eubanks <aeubanks@google.com>
+Cr-Commit-Position: refs/heads/main@{#1135007}
+---
+ build/config/compiler/BUILD.gn | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index 1c13bc80f0f..53db095c1b1 100644
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -685,6 +685,7 @@ config("compiler") {
+ "/lldltocache:" +
+ rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+ "/lldltocachepolicy:$cache_policy",
++ "-mllvm:-disable-auto-upgrade-debug-info",
+ ]
+ } else {
+ ldflags += [ "-flto=thin" ]
+@@ -725,6 +726,14 @@ config("compiler") {
+ }
+
+ ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
++
++ if (!is_chromeos) {
++ # TODO(https://crbug.com/972449): turn on for ChromeOS when that
++ # toolchain has this flag.
++ # We only use one version of LLVM within a build so there's no need to
++ # upgrade debug info, which can be expensive since it runs the verifier.
++ ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
++ }
+ }
+
+ # TODO(https://crbug.com/1211155): investigate why this isn't effective on