aboutsummaryrefslogtreecommitdiff
path: root/devel/electron29/files/patch-build_toolchain_gcc__toolchain.gni
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron29/files/patch-build_toolchain_gcc__toolchain.gni')
-rw-r--r--devel/electron29/files/patch-build_toolchain_gcc__toolchain.gni44
1 files changed, 44 insertions, 0 deletions
diff --git a/devel/electron29/files/patch-build_toolchain_gcc__toolchain.gni b/devel/electron29/files/patch-build_toolchain_gcc__toolchain.gni
new file mode 100644
index 000000000000..5beef57b71d1
--- /dev/null
+++ b/devel/electron29/files/patch-build_toolchain_gcc__toolchain.gni
@@ -0,0 +1,44 @@
+--- build/toolchain/gcc_toolchain.gni.orig 2024-02-21 00:20:30 UTC
++++ build/toolchain/gcc_toolchain.gni
+@@ -53,6 +53,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 = ""
++}
++
+ # This template defines a toolchain for something that works like gcc
+ # (including clang).
+ #
+@@ -886,22 +893,12 @@ template("clang_toolchain") {
+ # use_gold too.
+ template("clang_toolchain") {
+ gcc_toolchain(target_name) {
+- _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"
++ readelf = "readelf"
++ ar = "ar"
++ nm = "nm"
+
+ forward_variables_from(invoker, "*", [ "toolchain_args" ])
+