summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2025-09-09 19:59:18 +0200
committerArthur LAURENT <[email protected]>2025-09-09 19:59:18 +0200
commit84b2226f6910687a961bf45c2f8d8d4f8f4a5502 (patch)
treea86eac5cf712a43e64994781cf2282955f60d64f
parent5166d71131f62fb50c745510bcd8c54097bd6c05 (diff)
fix(windows.subsystem rule) use Xlinker instead of -Wl when using clang to allow pass the system version
-rw-r--r--xmake/rules/platform/windows/subsystem/xmake.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/platform/windows/subsystem/xmake.lua b/xmake/rules/platform/windows/subsystem/xmake.lua
index 6ee96324a..2f580e4e1 100644
--- a/xmake/rules/platform/windows/subsystem/xmake.lua
+++ b/xmake/rules/platform/windows/subsystem/xmake.lua
@@ -39,7 +39,7 @@ rule("platform.windows.subsystem")
assert(valid, "Invalid subsystem " .. subsystem)
if target:has_tool("ld", "clang", "clangxx", "clang_cl") then
- target:add("ldflags", "-Wl,-subsystem:" .. subsystem, { force = true })
+ target:add("ldflags", "-Xlinker", "-subsystem:" .. subsystem, { force = true })
elseif target:has_tool("ld", "link", "lld-link") then
target:add("ldflags", "/SUBSYSTEM:" .. subsystem:upper(), { force = true })
elseif target:has_tool("ld", "gcc", "gxx") then