9 Star 1 Fork 26

src-openEuler/chromium

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gcc-enable-lto.patch 2.23 KB
一键复制 编辑 原始数据 按行查看 历史
misaka00251 提交于 2024-09-13 17:05 . Upgrade to version 128
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",
"//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 (build_rust_base_conversions) {
sources += [
"containers/span_rust_unittest.cc",
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/chromium.git
git@gitee.com:src-openeuler/chromium.git
src-openeuler
chromium
chromium
master

搜索帮助