summaryrefslogtreecommitdiff
path: root/xmake/rules/platform
diff options
context:
space:
mode:
authorruki <[email protected]>2022-01-07 22:30:49 +0800
committerruki <[email protected]>2022-01-07 22:30:49 +0800
commit704332f0dbb224ed4ef0fb6d4096e5eaf9f3e47b (patch)
tree8858b5cca5a364b97b72da041c7f52b3a00bf9b6 /xmake/rules/platform
parenta4943a509a8534cf1372b95162efd31fe532a8e5 (diff)
improve c++ modules
Diffstat (limited to 'xmake/rules/platform')
-rw-r--r--xmake/rules/platform/windows/def/xmake.lua3
-rw-r--r--xmake/rules/platform/windows/manifest/xmake.lua3
2 files changed, 2 insertions, 4 deletions
diff --git a/xmake/rules/platform/windows/def/xmake.lua b/xmake/rules/platform/windows/def/xmake.lua
index 06e960380..7919553de 100644
--- a/xmake/rules/platform/windows/def/xmake.lua
+++ b/xmake/rules/platform/windows/def/xmake.lua
@@ -22,8 +22,7 @@
rule("platform.windows.def")
set_extensions(".def")
on_config("windows", function (target)
- local _, toolname = target:tool("ld")
- if toolname == "link" then
+ if target:has_tool("ld", "link") then
for _, sourcebatch in pairs(target:sourcebatches()) do
if sourcebatch.rulename == "platform.windows.def" then
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
diff --git a/xmake/rules/platform/windows/manifest/xmake.lua b/xmake/rules/platform/windows/manifest/xmake.lua
index efb750edd..b476faeed 100644
--- a/xmake/rules/platform/windows/manifest/xmake.lua
+++ b/xmake/rules/platform/windows/manifest/xmake.lua
@@ -23,8 +23,7 @@
rule("platform.windows.manifest")
set_extensions(".manifest")
on_config("windows", function (target)
- local _, toolname = target:tool("ld")
- if toolname == "link" then
+ if target:has_tool("ld", "link") then
local manifest = false
for _, sourcebatch in pairs(target:sourcebatches()) do
if sourcebatch.rulename == "platform.windows.manifest" then