diff options
author | Jeremie Dimino <jeremie@dimino.org> | 2018-09-18 14:49:18 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2019-01-30 16:36:38 +0000 |
commit | 7e0862a21290ba9462ef3bd7f82fc6835b25852b (patch) | |
tree | 0e797bb88543b939eaf3fa2ecebabf65143db544 /utils/ccomp.ml | |
parent | 295684568142aa3df72075346d8c9b306e43a1e0 (diff) | |
download | ocaml-7e0862a21290ba9462ef3bd7f82fc6835b25852b.tar.gz |
Refactor load path management and initial environment
- Add a Load_path module which caches files lookup
- Instead of falling back to the external environment, allow to
declare in the environment that a module comes from the external
world. This allows persistent structures to shadows non-persistent
ones
Diffstat (limited to 'utils/ccomp.ml')
-rw-r--r-- | utils/ccomp.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/ccomp.ml b/utils/ccomp.ml index b6b6e2d192..d5cee6494e 100644 --- a/utils/ccomp.ml +++ b/utils/ccomp.ml @@ -161,7 +161,7 @@ let expand_libname name = let libname = "lib" ^ String.sub name 2 (String.length name - 2) ^ Config.ext_lib in try - Misc.find_in_path !Config.load_path libname + Load_path.find libname with Not_found -> libname end @@ -191,7 +191,7 @@ let call_linker mode output_name files extra = Printf.sprintf "%s%s %s %s %s" Config.native_pack_linker (Filename.quote output_name) - (quote_prefixed l_prefix !Config.load_path) + (quote_prefixed l_prefix (Load_path.get_paths ())) (quote_files (remove_Wl files)) extra else @@ -206,7 +206,7 @@ let call_linker mode output_name files extra = (Filename.quote output_name) (if !Clflags.gprofile then Config.cc_profile else "") "" (*(Clflags.std_include_flag "-I")*) - (quote_prefixed "-L" !Config.load_path) + (quote_prefixed "-L" (Load_path.get_paths ())) (String.concat " " (List.rev !Clflags.all_ccopts)) (quote_files files) extra |