Skip to content

Commit

Permalink
Omit standard library dir from load path if -nostdlib is set
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Jun 26, 2024
1 parent 6665c68 commit 64dbabd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# 11.1.3-rc.1

#### :bug: Bug Fix

- Omit standard library dir from load path if -nostdlib is set. https://github.com/rescript-lang/rescript-compiler/pull/6833

# 11.1.2

#### :bug: Bug Fix
Expand Down
4 changes: 3 additions & 1 deletion jscomp/core/res_compmisc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ let init_path () =
let exp_dirs =
List.map (Misc.expand_directory Config.standard_library) dirs
in
Config.load_path := List.rev_append exp_dirs [Config.standard_library];
Config.load_path :=
if !Js_config.no_stdlib then exp_dirs
else (List.rev_append exp_dirs [Config.standard_library]);
Env.reset_cache ()

(* Return the initial environment in which compilation proceeds. *)
Expand Down

0 comments on commit 64dbabd

Please sign in to comment.