Skip to content

Commit

Permalink
Respect "STRIP" env variable for prebuilt artifact (#509)
Browse files Browse the repository at this point in the history
* Respect "STRIP" env variable for prebuilt artifact

When building the release artifact, respect the STRIP
environment variable if set.

Signed-off-by: Jonathan Schwender <[email protected]>

* Bump mozjs-sys to 128.0-11

Signed-off-by: Jonathan Schwender <[email protected]>

---------

Signed-off-by: Jonathan Schwender <[email protected]>
  • Loading branch information
jschwe authored Sep 24, 2024
1 parent 2aa7659 commit 5fe5854
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mozjs-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "mozjs_sys"
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
repository.workspace = true
version = "0.128.0-10"
version = "0.128.0-11"
authors = ["Mozilla"]
links = "mozjs"
build = "build.rs"
Expand Down
3 changes: 2 additions & 1 deletion mozjs-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,11 @@ fn compress_static_lib(build_dir: &Path) -> Result<(), std::io::Error> {
&mut File::open(build_dir.join("gluebindings.rs")).unwrap(),
)?;
} else {
let strip_bin = get_cc_rs_env_os("STRIP").unwrap_or_else(|| "strip".into());
// Strip symbols from the static binary since it could bump up to 1.6GB on Linux.
// TODO: Maybe we could separate symbols for thos who still want the debug ability.
// https://github.com/GabrielMajeri/separate-symbols
let mut strip = Command::new("strip");
let mut strip = Command::new(strip_bin);
if !target.contains("apple") {
strip.arg("--strip-debug");
};
Expand Down

0 comments on commit 5fe5854

Please sign in to comment.