From 4a06faa881a4fdfbe1ecca8c39e9805c01914c44 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Tue, 18 Jul 2023 17:47:49 +0200 Subject: [PATCH] modules plugin: fix target directory of dlls --- compiler/plugins/modules.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/plugins/modules.ml b/compiler/plugins/modules.ml index 80ebf39f..14fce14d 100644 --- a/compiler/plugins/modules.ml +++ b/compiler/plugins/modules.ml @@ -115,7 +115,7 @@ let compile options link_modules optimize check_invariants = gen_ocaml options link_modules optimize check_invariants (Some modname) None in let flags = ["-I"; Lazy.force runtime_dir] in - let shared_out = basename ^ ".cmxs" in + let shared_out = File.(Filename.dirname ml_file / basename ^ ".cmxs") in Message.emit_debug "Compiling OCaml shared object file @{%s@}..." shared_out; run_process "ocamlopt" ("-shared" :: ml_file :: "-o" :: shared_out :: flags);