diff options
-rw-r--r-- | toplevel/topdirs.ml | 3 | ||||
-rw-r--r-- | toplevel/toploop.ml | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml index 43368be7f..f72a4daa6 100644 --- a/toplevel/topdirs.ml +++ b/toplevel/topdirs.ml @@ -74,8 +74,7 @@ let load_compunit ic filename compunit = let code_size = compunit.cu_codesize + 4 in let code = Meta.static_alloc code_size in unsafe_really_input ic code 0 compunit.cu_codesize; - String.unsafe_set code compunit.cu_codesize - (Char.chr Opcodes.opSTOP); + String.unsafe_set code compunit.cu_codesize (Char.chr Opcodes.opSTOP); String.unsafe_set code (compunit.cu_codesize + 1) '\000'; String.unsafe_set code (compunit.cu_codesize + 2) '\000'; String.unsafe_set code (compunit.cu_codesize + 3) '\000'; diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml index 988623829..e019abf89 100644 --- a/toplevel/toploop.ml +++ b/toplevel/toploop.ml @@ -15,6 +15,7 @@ open Lexing open Format +open Config open Misc open Parsetree open Typedtree @@ -188,6 +189,10 @@ let loop() = print_string "\tCaml Special Light version "; print_string Config.version; print_newline(); print_newline(); + (* Add whatever -I options have been specified on the command line, + but keep the directories that user code linked in with cslmktop + may have added to load_path. *) + load_path := "" :: (List.rev !Clflags.include_dirs @ !load_path); toplevel_env := Compile.initial_env(); let lb = Lexing.from_function refill_lexbuf in Location.input_name := ""; |