File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -888,19 +888,21 @@ fn compress_static_lib(build_dir: &Path) -> Result<(), std::io::Error> {
888888 & mut File :: open ( build_dir. join ( "gluebindings.rs" ) ) . unwrap ( ) ,
889889 ) ?;
890890 } else {
891- let strip_bin = get_cc_rs_env_os ( "STRIP" ) . unwrap_or_else ( || "strip" . into ( ) ) ;
892- // Strip symbols from the static binary since it could bump up to 1.6GB on Linux.
893- // TODO: Maybe we could separate symbols for thos who still want the debug ability.
894- // https://github.com/GabrielMajeri/separate-symbols
895- let mut strip = Command :: new ( strip_bin) ;
896- if !target. contains ( "apple" ) {
897- strip. arg ( "--strip-debug" ) ;
898- } ;
899- let status = strip
900- . arg ( build_dir. join ( "js/src/build/libjs_static.a" ) )
901- . status ( )
902- . unwrap ( ) ;
903- assert ! ( status. success( ) ) ;
891+ if env:: var_os ( "CARGO_FEATURE_DEBUGMOZJS" ) . is_none ( ) {
892+ let strip_bin = get_cc_rs_env_os ( "STRIP" ) . unwrap_or_else ( || "strip" . into ( ) ) ;
893+ // Strip symbols from the static binary since it could bump up to 1.6GB on Linux.
894+ // TODO: Maybe we could separate symbols for thos who still want the debug ability.
895+ // https://github.com/GabrielMajeri/separate-symbols
896+ let mut strip = Command :: new ( strip_bin) ;
897+ if !target. contains ( "apple" ) {
898+ strip. arg ( "--strip-debug" ) ;
899+ } ;
900+ let status = strip
901+ . arg ( build_dir. join ( "js/src/build/libjs_static.a" ) )
902+ . status ( )
903+ . unwrap ( ) ;
904+ assert ! ( status. success( ) ) ;
905+ }
904906
905907 // This is the static library of spidermonkey.
906908 tar. append_file (
You can’t perform that action at this time.
0 commit comments