diff options
| author | ruki <[email protected]> | 2026-03-19 22:41:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-19 22:41:51 +0800 |
| commit | 858838adf60ea17ce51a82bfe668463a4e92cf6f (patch) | |
| tree | 9ab29a7847f2463d46867c6708c3554ee37b2d72 | |
| parent | ed0996a0ead18b79a3e279a200db0f9e13a4ec23 (diff) | |
improve ldc on windows
| -rw-r--r-- | xmake/modules/core/tools/ldc2.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/ldc2.lua b/xmake/modules/core/tools/ldc2.lua index fa2e210a0..93215f940 100644 --- a/xmake/modules/core/tools/ldc2.lua +++ b/xmake/modules/core/tools/ldc2.lua @@ -48,6 +48,16 @@ function nf_optimize(self, level) return maps[level] end +-- make the linkdir flag +-- ldc2 on windows uses msvc link.exe which requires /libpath: (not -libpath:) +function nf_linkdir(self, dir) + if self:is_plat("windows") then + return {"-L/libpath:" .. dir} + else + return {"-L-L" .. dir} + end +end + -- make the symbol flag function nf_symbol(self, level) local kind = self:kind() |
