Skip to content

Commit 739a5f6

Browse files
committed
strip by default for non windows platform
1 parent 965c0e7 commit 739a5f6

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

scripts/install.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ function provideCompiler() {
357357
var releaseNinja = require("./ninjaFactory.js").libNinja({
358358
ocamlopt: "ocamlopt.opt",
359359
ext: ".exe",
360-
INCL: ocamlVersion
360+
INCL: ocamlVersion,
361+
isWin : is_windows
361362
});
362363

363364
var filePath = path.join(lib_dir, "release.ninja");

scripts/ninjaFactory.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//@ts-check
55
/**
66
*
7-
* @param {{ocamlopt : string ; ext : string ; INCL : string}} config
7+
* @param {{ocamlopt : string ; ext : string ; INCL : string, isWin : boolean}} config
88
*
99
*/
1010
function libNinja(config){
@@ -14,7 +14,7 @@ ext = ${config.ext}
1414
INCL = ${config.INCL}
1515
flags = -I $INCL -g -w -a ../jscomp/stubs/ext_basic_hash_stubs.c
1616
rule cc
17-
command = $ocamlopt $flags $in -o $out
17+
command = $ocamlopt $flags $in -o $out ${config.isWin? '' : '&& strip $out'}
1818
description = Making $out
1919
# -inline 1000 makes size too large
2020
# TODO: make sure it can be bootstrapped, at least is a very good

scripts/prebuilt.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ function buildCompiler() {
2121
var content = require('./ninjaFactory.js').libNinja({
2222
ocamlopt : is_windows?`ocamlopt.opt.exe`:`../native/${ocamlVersion}/bin/ocamlopt.opt`,
2323
ext : sys_extension,
24-
INCL : ocamlVersion
24+
INCL : ocamlVersion,
25+
isWin : is_windows
2526
})
2627

2728
fs.writeFileSync(path.join(root,'lib',prebuilt),content,'ascii')

0 commit comments

Comments
 (0)