From 44b8b51390c17fe9c71d313aca2f5552d24c35c6 Mon Sep 17 00:00:00 2001 From: alainfrisch Date: Fri, 11 Dec 2015 11:14:31 +0100 Subject: [PATCH] MS linker expects /libpath:DIR, not -LDIR. Avoids warning when -pack'ing. --- utils/ccomp.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/ccomp.ml b/utils/ccomp.ml index a897ddc0d9c9..c89fecabd730 100644 --- a/utils/ccomp.ml +++ b/utils/ccomp.ml @@ -112,10 +112,15 @@ let remove_Wl cclibs = let call_linker mode output_name files extra = let cmd = if mode = Partial then + let l_prefix = + match Config.ccomp_type with + | "msvc" -> "/libpath:" + | _ -> "-L" + in Printf.sprintf "%s%s %s %s %s" Config.native_pack_linker (Filename.quote output_name) - (quote_prefixed "-L" !Config.load_path) + (quote_prefixed l_prefix !Config.load_path) (quote_files (remove_Wl files)) extra else