aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium/files/patch-build_toolchain_gcc__toolchain.gni')
-rw-r--r--www/chromium/files/patch-build_toolchain_gcc__toolchain.gni66
1 files changed, 26 insertions, 40 deletions
diff --git a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni
index 1613bd73a406..f017ad1a10fd 100644
--- a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni
+++ b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni
@@ -1,10 +1,12 @@
---- build/toolchain/gcc_toolchain.gni.orig 2021-06-09 22:13:52 UTC
+--- build/toolchain/gcc_toolchain.gni.orig 2024-03-22 08:19:40 UTC
+++ build/toolchain/gcc_toolchain.gni
-@@ -51,6 +51,11 @@ if (enable_resource_allowlist_generation) {
+@@ -57,6 +57,13 @@ if (enable_resource_allowlist_generation) {
"enable_resource_allowlist_generation=true does not work for target_os=$target_os")
}
+declare_args() {
++ extra_cflags = ""
++ extra_cppflags = ""
+ extra_cxxflags = ""
+ extra_ldflags = ""
+}
@@ -12,47 +14,31 @@
# This template defines a toolchain for something that works like gcc
# (including clang).
#
-@@ -647,20 +652,32 @@ template("gcc_toolchain") {
- # actually just be doing a native compile. The invoker can optionally override
+@@ -890,22 +897,12 @@ template("gcc_toolchain") {
# use_gold too.
template("clang_toolchain") {
-- if (defined(invoker.toolprefix)) {
-- toolprefix = invoker.toolprefix
-- } else {
-- toolprefix = ""
-+ if (!is_bsd) {
-+ if (defined(invoker.toolprefix)) {
-+ toolprefix = invoker.toolprefix
-+ } else {
-+ toolprefix = ""
-+ }
- }
-
gcc_toolchain(target_name) {
-- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
-- cc = "$prefix/clang"
-- cxx = "$prefix/clang++"
-- ld = cxx
-- readelf = "${toolprefix}readelf"
+- _path = "$clang_base_path/bin"
+- _is_path_absolute = get_path_info(_path, "abspath") == _path
+-
+- # Preserve absolute paths for tools like distcc.
+- if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) {
+- prefix = _path
+- } else {
+- prefix = rebase_path(_path, root_build_dir)
+- }
+-
+- cc = "${prefix}/clang"
+- cxx = "${prefix}/clang++"
++ cc = "cc"
++ cxx = "c++"
+ ld = cxx
+- readelf = "${prefix}/llvm-readelf"
- ar = "${prefix}/llvm-ar"
- nm = "${prefix}/llvm-nm"
-+ if (is_bsd) {
-+ prefix = "/usr/local/bin"
-+ cc = "cc"
-+ cxx = "c++"
-+ ld = cxx
-+ readelf = "readelf"
-+ ar = "${prefix}/ar"
-+ nm = "${prefix}/nm"
-+ } else {
-+ prefix = rebase_path("$clang_base_path/bin", root_build_dir)
-+ cc = "$prefix/clang"
-+ cxx = "$prefix/clang++"
-+ ld = cxx
-+ readelf = "${toolprefix}readelf"
-+ ar = "${prefix}/llvm-ar"
-+ nm = "${prefix}/llvm-nm"
-+ }
++ readelf = "readelf"
++ ar = "ar"
++ nm = "nm"
+
+ forward_variables_from(invoker, "*", [ "toolchain_args" ])
- forward_variables_from(invoker,
- [