summaryrefslogtreecommitdiff
path: root/devel/electron36/files/patch-build_config_rust.gni
blob: ce4c4bfe125542dbefb10c8a20990e349f549676 (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
--- build/config/rust.gni.orig	2025-06-16 18:02:10 UTC
+++ build/config/rust.gni
@@ -69,7 +69,8 @@ declare_args() {
   # set this to the output of `rustc -V`. Changing this string will cause all
   # Rust targets to be rebuilt, which allows you to update your toolchain and
   # not break incremental builds.
-  rustc_version = ""
+  rustc_version = exec_script("//build/gn_run_binary.py",
+    [ "${LOCALBASE}/bin/rustc", "-V" ], "trim string")
 
   # If you're using a Rust toolchain as specified by rust_sysroot_absolute,
   # you can specify whether it supports nacl here.
@@ -344,6 +345,10 @@ if (is_linux || is_chromeos) {
   } else {
     assert(false, "Architecture not supported")
   }
+}
+
+if (is_bsd) {
+  rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os)
 }
 
 assert(!toolchain_has_rust || rust_abi_target != "")