diff options
| author | ruki <[email protected]> | 2024-12-01 13:27:32 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-12-01 13:27:32 +0800 |
| commit | 6762c1647b51f95b350829fcb7407a58a07734b6 (patch) | |
| tree | d9bfc98239453eccf5e5e78b19b9ea51589aa60a | |
| parent | ccc328a3538c9b6ca8537c1190de890e52b02b01 (diff) | |
Update xmake.lua
| -rw-r--r-- | xmake/rules/winsdk/xmake.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/winsdk/xmake.lua b/xmake/rules/winsdk/xmake.lua index 3c7e6fa0f..60be1ce08 100644 --- a/xmake/rules/winsdk/xmake.lua +++ b/xmake/rules/winsdk/xmake.lua @@ -35,7 +35,7 @@ rule("win.sdk.application") after_load(function (target) -- set subsystem: windows - if is_plat("mingw") then + if target:is_plat("mingw") then target:add("ldflags", "-mwindows", {force = true}) else local subsystem = false @@ -48,8 +48,8 @@ rule("win.sdk.application") end end end - if not subsystem then - target:add("ldflags", "-subsystem:windows", {force = true, tools = "link"}) + if not subsystem and target:has_tool("ld", "link") then + target:add("ldflags", "-subsystem:windows", {force = true}) end end |
