Skip to content

Commit ec44206

Browse files
committed
no warnings for release mode
1 parent f99318a commit ec44206

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

jscomp/stdlib-402/release.ninja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
bsc = ../lib/bsc.exe
3-
bsc_flags = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib -w -40-49-103 -bin-annot -bs-no-warn-unimplemented-external -I runtime -I others
3+
bsc_flags = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib -w -40-49-103-3 -bin-annot -bs-no-warn-unimplemented-external -I runtime -I others
44
rule cc
55
command = $bsc -bs-cmi -bs-cmj $bsc_flags -bs-no-implicit-include -I stdlib-402 -c $in
66
description = $in -> $out

scripts/ninja.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,9 +785,11 @@ async function stdlibNinja(devmode=true){
785785
* @type [string,string][]
786786
*/
787787
var bsc_builtin_overrides = [[bsc_flags,`$${bsc_flags} -nopervasives`]]
788+
// It is interesting `-w -a` would generate not great code sometimes
789+
var warnings = devmode ? '-w -40-49-103' : '-w -40-49-103-3'
788790
var templateStdlibRules = `
789791
${BSC_COMPILER}
790-
${bsc_flags} = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib -w -40-49-103 -bin-annot -bs-no-warn-unimplemented-external -I runtime -I others
792+
${bsc_flags} = -absname -no-alias-deps -bs-no-version-header -bs-diagnose -bs-no-check-div-by-zero -bs-cross-module-opt -bs-package-name bs-platform -bs-package-output commonjs:lib/js -bs-package-output es6:lib/es6 -nostdlib ${warnings} -bin-annot -bs-no-warn-unimplemented-external -I runtime -I others
791793
rule cc
792794
command = $bsc -bs-cmi -bs-cmj $${bsc_flags} -bs-no-implicit-include -I ${ninjaCwd} -c $in
793795
description = $in -> $out

0 commit comments

Comments
 (0)