Files
jsrt/compiler/build.rs
T
2026-10-03 14:06:24 +00:00

18 lines
605 B
Rust

const QUICKJS: &str = "../third_party/quickjs/build";
fn main() {
// The compiler compiles the C it emits for the target it is built for (see
// main.rs)
println!("cargo:rustc-env=TARGET={}", std::env::var("TARGET").unwrap());
println!("cargo:rustc-link-search=native={QUICKJS}");
println!("cargo:rustc-link-lib=static=qjs");
println!("cargo:rustc-link-lib=dylib=m");
println!("cargo:rustc-link-lib=dylib=dl");
println!("cargo:rustc-link-lib=dylib=pthread");
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed={QUICKJS}/libqjs.a");
}