aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nativelib.ml9
-rw-r--r--kernel/nativelib.mli3
2 files changed, 6 insertions, 6 deletions
diff --git a/kernel/nativelib.ml b/kernel/nativelib.ml
index 05e470da97..b877dda8f1 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 *)
diff --git a/kernel/nativelib.mli b/kernel/nativelib.mli
index e577a9032b..a2633ac2c0 100644
--- a/kernel/nativelib.mli
+++ b/kernel/nativelib.mli
@@ -18,8 +18,7 @@ val get_ml_filename : unit -> string * string
val compile : string -> global list -> int * string
-val compile_library : Names.dir_path ->
- global list -> string list -> string -> int
+val compile_library : Names.dir_path -> global list -> string -> int
val call_linker :
?fatal:bool -> string -> string -> code_location_updates option -> unit