diff options
Diffstat (limited to 'kernel/nativelib.ml')
-rw-r--r-- | kernel/nativelib.ml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/nativelib.ml b/kernel/nativelib.ml index 05e470da9..b877dda8f 100644 --- a/kernel/nativelib.ml +++ b/kernel/nativelib.ml @@ -59,7 +59,8 @@ let write_ml_code fn ?(header=[]) code = List.iter (pp_global fmt) (header@code); close_out ch_out -let call_compiler ml_filename load_path = +let call_compiler ml_filename = + let load_path = !get_load_paths () in let load_path = List.map (fun dn -> dn / output_dir) load_path in let include_dirs = List.map Filename.quote (include_dirs () @ load_path) in let include_dirs = String.concat " -I " include_dirs in @@ -75,9 +76,9 @@ let call_compiler ml_filename load_path = let compile fn code = write_ml_code fn code; - call_compiler fn (!get_load_paths()) + call_compiler fn -let compile_library dir code load_path fn = +let compile_library dir code fn = let header = mk_library_header dir in let fn = fn ^ source_ext in let basename = Filename.basename fn in @@ -86,7 +87,7 @@ let compile_library dir code load_path fn = if not (Sys.file_exists dirname) then Unix.mkdir dirname 0o755; let fn = dirname / basename in write_ml_code fn ~header code; - fst (call_compiler fn load_path) + fst (call_compiler fn) (* call_linker links dynamically the code for constants in environment or a *) (* conversion test. Silently fails if the file does not exist in bytecode *) |