diff options
| author | ruki <[email protected]> | 2024-12-01 22:13:13 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-12-01 22:13:13 +0800 |
| commit | 1c1b5c1d2b29aa44fb75178c85afcab3a3b12493 (patch) | |
| tree | 617f04ed3b422a2201998092a6e5fca8bfe41ecb | |
| parent | c1704215e76135a16d6b214904b244c2b7d2b00a (diff) | |
| parent | 6762c1647b51f95b350829fcb7407a58a07734b6 (diff) | |
Merge pull request #5910 from ifarbod/patch-2
Limit adding /subsystem:windows to link.exe
| -rw-r--r-- | xmake/rules/winsdk/xmake.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/winsdk/xmake.lua b/xmake/rules/winsdk/xmake.lua index b782c4f1f..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,7 +48,7 @@ rule("win.sdk.application") end end end - if not subsystem then + if not subsystem and target:has_tool("ld", "link") then target:add("ldflags", "-subsystem:windows", {force = true}) end end |
