nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 19 lines 740 B view raw
1diff --git a/crates/c/build.rs b/crates/c/build.rs 2index 8d822e5..8b7e371 100644 3--- a/crates/c/build.rs 4+++ b/crates/c/build.rs 5@@ -1,9 +1,13 @@ 6 fn main() { 7 println!("cargo:rerun-if-changed=src/f16.h"); 8 println!("cargo:rerun-if-changed=src/f16.c"); 9+ println!("cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS"); 10 cc::Build::new() 11- .compiler("clang-16") 12+ .compiler("@clang@") 13 .file("./src/f16.c") 14+ // read env var set by rustPlatform.bindgenHook 15+ .try_flags_from_environment("BINDGEN_EXTRA_CLANG_ARGS") 16+ .expect("the BINDGEN_EXTRA_CLANG_ARGS environment variable must be specified and UTF-8") 17 .opt_level(3) 18 .debug(true) 19 .compile("vectorsc");