diff options
| author | ruki <[email protected]> | 2025-07-21 21:28:30 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-21 21:28:30 +0800 |
| commit | 30c391ef694cad88de2bf8c67cda153e9943c8b2 (patch) | |
| tree | 479166dbbc525572235e64fa421e75ae2d97b7f1 | |
| parent | a596bad6cfb903ec52e4f39142bef178a3cd6c6f (diff) | |
| parent | f4b10ec248d670ad3e0a18eff044745f65aee34b (diff) | |
Merge pull request #6644 from star-hengxing/patch-1
Support .def file with clang
| -rw-r--r-- | xmake/rules/platform/windows/def/xmake.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/rules/platform/windows/def/xmake.lua b/xmake/rules/platform/windows/def/xmake.lua index 00f795434..08279d90a 100644 --- a/xmake/rules/platform/windows/def/xmake.lua +++ b/xmake/rules/platform/windows/def/xmake.lua @@ -26,7 +26,7 @@ rule("platform.windows.def") return end - if target:is_plat("windows") and (not target:has_tool("sh", "link")) then + if target:is_plat("windows") and (not target:has_tool("sh", "link", "clangxx")) then return end @@ -36,6 +36,9 @@ rule("platform.windows.def") local flag = path.translate(sourcefile) if target:is_plat("windows") then flag = "/def:" .. flag + if target:has_tool("sh", "clangxx") then + flag = "-Wl," .. flag + end end -- https://github.com/xmake-io/xmake/pull/4901 target:add("shflags", flag, {force = true}) |
