Index: build/config/rust.gni
--- build/config/rust.gni.orig
+++ build/config/rust.gni
@@ -62,7 +62,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",
+    [ "/usr/local/bin/rustc", "-V" ], "trim string")
 
   # Whether artifacts produced by the Rust compiler can participate in ThinLTO.
   #
@@ -326,7 +327,11 @@ if (is_linux || is_chromeos) {
   }
 }
 
-if (toolchain_has_rust) {
+if (is_bsd) {
+  rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os)
+}
+
+if (toolchain_has_rust && !is_bsd) {
   assert(rust_abi_target != "")
 
   _known_rust_target_triples_filepath = "//build/rust/known-target-triples.txt"
