diff options
| author | ruki <[email protected]> | 2022-10-08 00:36:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-08 00:36:00 +0800 |
| commit | f210bb148f933253f5dc1338d08382a19df6b245 (patch) | |
| tree | 8b8b8813c2aacade5790c0f3ac630d2efa70dd51 /xmake/modules/core/tools/dmd.lua | |
| parent | 664ef028094a250e06521b4a3bdb2a3a5fb567e6 (diff) | |
improve dlang tests
Diffstat (limited to 'xmake/modules/core/tools/dmd.lua')
| -rw-r--r-- | xmake/modules/core/tools/dmd.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua index c6b84ebc1..899fc2511 100644 --- a/xmake/modules/core/tools/dmd.lua +++ b/xmake/modules/core/tools/dmd.lua @@ -133,14 +133,16 @@ end -- make the rpathdir flag function nf_rpathdir(self, dir) - dir = path.translate(dir) - if self:has_flags("-L-rpath=" .. dir, "ldflags") then - return {"-L-rpath=" .. (dir:gsub("@[%w_]+", function (name) - local maps = {["@loader_path"] = "$ORIGIN", ["@executable_path"] = "$ORIGIN"} - return maps[name] - end))} - elseif self:has_flags("-L-rpath -L" .. dir, "ldflags") then - return {"-L-rpath", "-L" .. (dir:gsub("%$ORIGIN", "@loader_path"))} + if not self:is_plat("windows") then + dir = path.translate(dir) + if self:has_flags("-L-rpath=" .. dir, "ldflags") then + return {"-L-rpath=" .. (dir:gsub("@[%w_]+", function (name) + local maps = {["@loader_path"] = "$ORIGIN", ["@executable_path"] = "$ORIGIN"} + return maps[name] + end))} + elseif self:has_flags("-L-rpath -L" .. dir, "ldflags") then + return {"-L-rpath", "-L" .. (dir:gsub("%$ORIGIN", "@loader_path"))} + end end end |
