codemp/build.rs
alemi 55929146d6
fix: add macos build args to build.rs, simplify ci
since we dont need to pass custom build command anymore to make lua work
on macos, we can dramatically slim down our lua and test CIs
2024-09-25 21:32:01 +02:00

26 lines
608 B
Rust

#[cfg(feature = "js")]
extern crate napi_build;
#[cfg(any(feature = "py", feature = "py-noabi"))]
extern crate pyo3_build_config;
/// The main method of the buildscript, required by some glue modules.
fn main() {
#[cfg(feature = "js")]
{
napi_build::setup();
}
#[cfg(any(feature = "py", feature = "py-noabi"))]
{
pyo3_build_config::add_extension_module_link_args();
}
#[cfg(feature = "lua")]
{
if let Ok("macos") = std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
println!("cargo:rustc-cdylib-link-arg=-undefined");
println!("cargo:rustc-cdylib-link-arg=dynamic_lookup");
}
}
}