Accepting request 713244 from home:marxin:branches:network:chromium
- Enable LTO for x86_64 - add gcc-enable-lto.patch and gcc-lto-rsp-clobber.patch patches. OBS-URL: https://build.opensuse.org/request/show/713244 OBS-URL: https://build.opensuse.org/package/show/network:chromium/chromium?expand=0&rev=1273
This commit is contained in:
committed by
Git OBS Bridge
parent
f7927bbed9
commit
c835cf326e
@@ -1,17 +1,17 @@
|
||||
Index: chromium-120.0.6099.18/build/config/BUILDCONFIG.gn
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.18.orig/build/config/BUILDCONFIG.gn
|
||||
+++ chromium-120.0.6099.18/build/config/BUILDCONFIG.gn
|
||||
@@ -135,6 +135,8 @@ declare_args() {
|
||||
# set "is_official_build" to true for any build intended to ship to end-users.
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 7175865b3..d345f6ff9 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -130,6 +130,8 @@ declare_args() {
|
||||
# separate flags.
|
||||
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" &&
|
||||
@@ -354,6 +356,12 @@ default_compiler_configs = [
|
||||
# Whether we're a traditional desktop unix.
|
||||
is_desktop_linux = current_os == "linux"
|
||||
|
||||
@@ -440,6 +442,12 @@ default_compiler_configs = [
|
||||
"//build/config/sanitizers:default_sanitizer_flags",
|
||||
]
|
||||
|
||||
@@ -23,13 +23,13 @@ Index: chromium-120.0.6099.18/build/config/BUILDCONFIG.gn
|
||||
+
|
||||
if (is_win) {
|
||||
default_compiler_configs += [
|
||||
"//build/config/win:default_cfg_compiler",
|
||||
Index: chromium-120.0.6099.18/build/config/compiler/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.18.orig/build/config/compiler/BUILD.gn
|
||||
+++ chromium-120.0.6099.18/build/config/compiler/BUILD.gn
|
||||
@@ -2342,6 +2342,10 @@ if (is_win) {
|
||||
common_optimize_on_cflags += [ "-fno-math-errno" ]
|
||||
"//build/config/win:default_crt",
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
index 4b24c762b..7da01887a 100644
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -1921,6 +1921,10 @@ if (is_win) {
|
||||
}
|
||||
}
|
||||
|
||||
+config("gcc_lto") {
|
||||
@@ -37,34 +37,17 @@ Index: chromium-120.0.6099.18/build/config/compiler/BUILD.gn
|
||||
+}
|
||||
+
|
||||
config("default_stack_frames") {
|
||||
if (!is_win) {
|
||||
if (is_posix || is_fuchsia) {
|
||||
if (enable_frame_pointers) {
|
||||
Index: chromium-120.0.6099.18/sandbox/linux/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.18.orig/sandbox/linux/BUILD.gn
|
||||
+++ chromium-120.0.6099.18/sandbox/linux/BUILD.gn
|
||||
@@ -253,6 +253,9 @@ component("seccomp_bpf") {
|
||||
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
|
||||
index b00a88cfa..db01e988a 100644
|
||||
--- a/sandbox/linux/BUILD.gn
|
||||
+++ b/sandbox/linux/BUILD.gn
|
||||
@@ -256,6 +256,7 @@ component("seccomp_bpf") {
|
||||
"//base",
|
||||
"//sandbox:sandbox_buildflags",
|
||||
"//base/third_party/dynamic_annotations",
|
||||
]
|
||||
+ if (gcc_lto) {
|
||||
+ configs -= [ "//build/config/compiler:gcc_lto" ]
|
||||
+ }
|
||||
+ configs -= [ "//build/config/compiler:gcc_lto" ]
|
||||
|
||||
if (is_android) {
|
||||
sources += [
|
||||
Index: chromium-120.0.6099.18/base/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.18.orig/base/BUILD.gn
|
||||
+++ chromium-120.0.6099.18/base/BUILD.gn
|
||||
@@ -3561,6 +3561,10 @@
|
||||
sources += [ "location_unittest.cc" ]
|
||||
}
|
||||
|
||||
+ if (gcc_lto) {
|
||||
+ configs -= [ "//build/config/compiler:gcc_lto" ]
|
||||
+ }
|
||||
+
|
||||
if (!is_nacl) {
|
||||
sources += [
|
||||
"containers/span_rust_unittest.cc",
|
||||
if (is_nacl_nonsfi) {
|
||||
cflags = [ "-fgnu-inline-asm" ]
|
||||
|
||||
Reference in New Issue
Block a user