From 6b5da460f6b86eccbb72e31b591443bd8f471ea3 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Thu, 22 Sep 2022 15:10:29 +0100 Subject: [PATCH] WIP: support -l: Needs to be extended not to try alternate extensions (i.e. to take the basename literally) --- reloc.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reloc.ml b/reloc.ml index 2b36ab7..2aee08c 100644 --- a/reloc.ml +++ b/reloc.ml @@ -296,7 +296,9 @@ let find_file = let fns = if String.length fn > 2 && String.sub fn 0 2 = "-l" then let base = String.sub fn 2 (String.length fn - 2) in - if !toolchain = `MSVC || !toolchain = `MSVC64 then + if String.length base > 0 && base.[0] = ':' then + [String.sub base 1 (String.length base - 1)] + else if !toolchain = `MSVC || !toolchain = `MSVC64 then ["lib" ^ base; base] else ["lib" ^ base]