blob: c4b8cb874d338a7f4fac426c1df505d54b54ac28 (
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-02-24 19:59:26 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.
@@ -296,6 +297,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 != "")
|