File tree 9 files changed +17
-8
lines changed
9 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 47
47
- Convert OCaml codebase to snake case style. https://github.com/rescript-lang/rescript-compiler/pull/6702
48
48
- Fix location of let bindings with attributes. https://github.com/rescript-lang/rescript-compiler/pull/6791
49
49
- Refactor uppercase exotic ident handling. https://github.com/rescript-lang/rescript-compiler/pull/6779
50
+ - Fix ` -nostdlib ` internal compiler option. https://github.com/rescript-lang/rescript-compiler/pull/6824
50
51
51
52
#### :nail_care : Polish
52
53
60
61
- In generated code, use ` let ` instead of ` var ` . https://github.com/rescript-lang/rescript-compiler/pull/6102
61
62
- Turn off transformation for closures inside loops when capturing loop variables, now that ` let ` is emitted instead of ` var ` . https://github.com/rescript-lang/rescript-compiler/pull/6480
62
63
- Improve unused attribute warning message. https://github.com/rescript-lang/rescript-compiler/pull/6787
63
- - Remove unused -no- stdlib compiler option . https://github.com/rescript-lang/rescript-compiler/pull/6778
64
+ - Remove internal option ` use- stdlib` from build schema . https://github.com/rescript-lang/rescript-compiler/pull/6778
64
65
65
66
# 11.1.1
66
67
Original file line number Diff line number Diff line change @@ -352,6 +352,9 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
352
352
" -bs-unsafe-empty-array" , set Config. unsafe_empty_array,
353
353
" *internal* Allow [||] to be polymorphic" ;
354
354
355
+ " -nostdlib" , set Js_config. no_stdlib,
356
+ " *internal* Don't use stdlib" ;
357
+
355
358
" -color" , string_call set_color_option,
356
359
" *internal* Enable or disable colors in compiler messages\n \
357
360
The following settings are supported:\n \
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ let jsx_module = ref React
54
54
let jsx_mode = ref Automatic
55
55
let js_stdout = ref true
56
56
let all_module_aliases = ref false
57
+ let no_stdlib = ref false
57
58
let no_export = ref false
58
59
let as_ppx = ref false
59
60
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ val js_stdout : bool ref
87
87
88
88
val all_module_aliases : bool ref
89
89
90
+ val no_stdlib : bool ref
91
+
90
92
val no_export : bool ref
91
93
92
94
val as_ppx : bool ref
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ let init_path () =
27
27
let exp_dirs =
28
28
List. map (Misc. expand_directory Config. standard_library) dirs
29
29
in
30
- Config. load_path := List. rev_append exp_dirs [Config. standard_library];
30
+ Config. load_path :=
31
+ if ! Js_config. no_stdlib then exp_dirs
32
+ else (List. rev_append exp_dirs [Config. standard_library]);
31
33
Env. reset_cache ()
32
34
33
35
(* Return the initial environment in which compilation proceeds. *)
Original file line number Diff line number Diff line change 1
1
2
- bsc_primitive_flags = -no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
2
+ bsc_primitive_flags = -no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero -nostdlib -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
3
3
bsc_flags = $bsc_primitive_flags -open Belt_internals
4
4
5
5
rule cc
Original file line number Diff line number Diff line change 1
1
2
- bsc_no_open_flags = -no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
2
+ bsc_no_open_flags = -no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero -nostdlib -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
3
3
bsc_flags = $bsc_no_open_flags -open Bs_stdlib_mini
4
4
5
5
rule cc
@@ -10,7 +10,7 @@ rule cc_cmi
10
10
description = $in -> $out
11
11
12
12
o runtime/bs_stdlib_mini.cmi : cc runtime/bs_stdlib_mini.resi
13
- bsc_flags = -nopervasives
13
+ bsc_flags = -nostdlib - nopervasives
14
14
o runtime/js.cmj runtime/js.cmi : cc runtime/js.ml
15
15
bsc_flags = $bsc_no_open_flags
16
16
o runtime/caml.cmj : cc_cmi runtime/caml.res | runtime/caml.cmi runtime/caml_int64_extern.cmj
Original file line number Diff line number Diff line change 1
1
2
- bsc_flags = -no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero -bs-cross-module-opt -make-runtime -w -9-3-106 -warn-error A -I others
2
+ bsc_flags = -no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero -nostdlib -bs-cross-module-opt -make-runtime -w -9-3-106 -warn-error A -I others
3
3
4
4
rule cc
5
5
command = $bsc -bs-cmi -bs-cmj $bsc_flags -I stdlib-406 $in
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ var runtimeMliFiles = runtimeFiles.filter(
30
30
var runtimeSourceFiles = runtimeMlFiles . concat ( runtimeMliFiles ) ;
31
31
var runtimeJsFiles = [ ...new Set ( runtimeSourceFiles . map ( baseName ) ) ] ;
32
32
33
- var commonBsFlags = `-no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero ` ;
33
+ var commonBsFlags = `-no-keep-locs -no-alias-deps -bs-no-version-header -bs-no-check-div-by-zero -nostdlib ` ;
34
34
var js_package = pseudoTarget ( "js_pkg" ) ;
35
35
var runtimeTarget = pseudoTarget ( "runtime" ) ;
36
36
var othersTarget = pseudoTarget ( "others" ) ;
@@ -843,7 +843,7 @@ ${ninjaQuickBuildList([
843
843
"bs_stdlib_mini.resi" ,
844
844
"cc" ,
845
845
ninjaCwd ,
846
- [ [ "bsc_flags" , "-nopervasives" ] ] ,
846
+ [ [ "bsc_flags" , "-nostdlib - nopervasives" ] ] ,
847
847
[ ] ,
848
848
externalDeps ,
849
849
] ,
You can’t perform that action at this time.
0 commit comments