Skip to content

Commit

Permalink
build: don't force a specific compiler/version (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
ju1ius authored Feb 2, 2024
1 parent 720fa45 commit be5c260
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,12 @@ fn main() {
let mut build = cc::Build::new();
build
.file("./deps/ada.cpp")
.include("./deps/ada.h")
.include("./deps/ada_c.h")
.include("./deps")
.cpp(true)
.std("c++17");

let compile_target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH");
let compile_target_os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS");
let compile_target_env = env::var("CARGO_CFG_TARGET_ENV").expect("CARGO_CFG_TARGET_ENV");
let compile_target_feature = env::var("CARGO_CFG_TARGET_FEATURE");
// Except for Emscripten target (which emulates POSIX environment), compile to Wasm via WASI SDK
// which is currently the only standalone provider of stdlib for compilation of C/C++ libraries.
Expand Down Expand Up @@ -175,8 +173,6 @@ fn main() {
println!("cargo:rustc-link-lib=c");
build.file("./deps/wasi_to_unknown.cpp");
}
} else if !(compile_target_os == "windows" && compile_target_env == "msvc") {
build.compiler("clang++");
}

let compiler = build.get_compiler();
Expand Down

0 comments on commit be5c260

Please sign in to comment.