aboutsummaryrefslogtreecommitdiff
path: root/www/deno/files/patch-cargo-crates_v8_build_toolchain_gcc__toolchain.gni
blob: bf0e808fcdba7a2f3b5d7bc20642de04b8607007 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- cargo-crates/v8-0.90.1/build/toolchain/gcc_toolchain.gni.orig	1970-01-01 01:00:00 UTC
+++ cargo-crates/v8-0.90.1/build/toolchain/gcc_toolchain.gni
@@ -53,6 +53,11 @@ if (enable_resource_allowlist_generation) {
       "enable_resource_allowlist_generation=true does not work for target_os=$target_os")
 }
 
+declare_args() {
+  extra_cxxflags = ""
+  extra_ldflags = ""
+}
+
 # This template defines a toolchain for something that works like gcc
 # (including clang).
 #
@@ -813,12 +818,23 @@ template("clang_toolchain") {
       prefix = rebase_path(_path, root_build_dir)
     }
 
-    cc = "${prefix}/clang"
-    cxx = "${prefix}/clang++"
-    ld = cxx
-    readelf = "${prefix}/llvm-readelf"
-    ar = "${prefix}/llvm-ar"
-    nm = "${prefix}/llvm-nm"
+    if (is_bsd) {
+      prefix = "%%LOCALBASE%%/bin"
+      cc = "cc"
+      cxx = "c++"
+      ld = cxx
+      readelf = "readelf"
+      ar = "llvm-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 = "${toolprefix}nm"
+    }
 
     forward_variables_from(invoker,
                            [