fix: cli build script behavior on release

This commit is contained in:
Amaan Qureshi 2024-03-10 17:53:22 -04:00
parent 0a5a564ea7
commit cdc9fbb240
No known key found for this signature in database
GPG key ID: E67890ADC4227273
3 changed files with 17 additions and 11 deletions

View file

@ -29,7 +29,23 @@ fn main() {
target_os = "netbsd",
target_os = "dragonfly",
))]
println!("cargo:rustc-link-arg=-Wl,--dynamic-list=cli/dynamic-symbols.txt");
{
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()).join("dynamic-symbols.txt");
std::fs::write(
&out_dir,
"{
ts_current_malloc;
ts_current_calloc;
ts_current_realloc;
ts_current_free;
};",
)
.unwrap();
println!(
"cargo:rustc-link-arg=-Wl,--dynamic-list={}",
out_dir.display()
);
}
}
fn web_playground_files_present() -> bool {

View file

@ -1,4 +0,0 @@
_ts_current_malloc
_ts_current_calloc
_ts_current_realloc
_ts_current_free

View file

@ -1,6 +0,0 @@
{
ts_current_malloc;
ts_current_calloc;
ts_current_realloc;
ts_current_free;
};