Files
chromium-dev/gcc-enable-lto.patch

71 lines
2.2 KiB
Diff
Raw Normal View History

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.
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 = [
"//build/config/sanitizers:default_sanitizer_flags",
]
+if (gcc_lto) {
+ default_compiler_configs += [
+ "//build/config/compiler:gcc_lto",
+ ]
+}
+
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" ]
}
+config("gcc_lto") {
+ cflags = [ "-flto" ]
+}
+
config("default_stack_frames") {
if (!is_win) {
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") {
"//build:chromeos_buildflags",
Accepting request 829924 from network:chromium - Refresh build-with-pipewire-0.3.patch to mirror similar patch by Fedora for Firefox; screen-capture wasn't actually working with the previous version of the patch. - Add BuildRequires: pkgconfig(libspa-0.2) when building with pipewire support to guard against potential package splitting off of pipewire-spa-devel from pipewire-devel. - Update _constraints to avoid very slow builds seen on obs-arm-4 (probably due to swap) - Add icu-v67.patch from upstream to fix build with icu v67 - Disable lto to avoid the overflow >16GB ram used - Use internal resources for icon and appdata - Added patch chromium-vaapi-fix.patch again to fix boo#1146219 ------------------------------------------------------------------- - Up to 78.0.3887.7 - Enable LTO for x86_64 - add gcc-enable-lto.patch and gcc-lto-rsp-clobber.patch patches. - Refresh patch: * chromium-non-void-return.patch - Add new patch to fix aarch64 build: * chromium-fix_swiftshader.patch - Update %arm build, but keep it disabled for now, as ld requires lots of RAM - Up to 72.0.3626.14 - Update chromium-vaapi.patch - Update chromium-system-icu.patch - Increase %limit_build value to avoid OOM - Rework aarch64 build requirements - Reduce jumbo_file_merge_limit to 8 for aarch64 to avoid OOM - Fix again aarch64 skia build: * chromium-skia-aarch64-buildfix.patch OBS-URL: https://build.opensuse.org/request/show/829924 OBS-URL: https://build.opensuse.org/package/show/network:chromium/chromium?expand=0&rev=1464
2020-08-27 08:24:47 +00:00
"//sandbox:sandbox_buildflags",
]
+ if (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",