Skip to content

Commit 858838a

Browse files
committed
improve ldc on windows
1 parent ed0996a commit 858838a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

xmake/modules/core/tools/ldc2.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ function nf_optimize(self, level)
4848
return maps[level]
4949
end
5050

51+
-- make the linkdir flag
52+
-- ldc2 on windows uses msvc link.exe which requires /libpath: (not -libpath:)
53+
function nf_linkdir(self, dir)
54+
if self:is_plat("windows") then
55+
return {"-L/libpath:" .. dir}
56+
else
57+
return {"-L-L" .. dir}
58+
end
59+
end
60+
5161
-- make the symbol flag
5262
function nf_symbol(self, level)
5363
local kind = self:kind()

0 commit comments

Comments
 (0)