summaryrefslogtreecommitdiff
path: root/xmake/core/project/project.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-10-16 22:47:57 +0800
committerruki <[email protected]>2025-10-16 22:47:57 +0800
commitfa1e44cc4ee14fdc3e6e82546c995e888c56d460 (patch)
treee9af38a6875b3920e1e53e336831dd57e8ea7183 /xmake/core/project/project.lua
parent7529874021cda55b9199d07c17922f97e969e272 (diff)
add requirestr in toolchain
Diffstat (limited to 'xmake/core/project/project.lua')
-rw-r--r--xmake/core/project/project.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 5af05c21f..8b94cbff7 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -1207,9 +1207,14 @@ end
-- get the given toolchain
function project.toolchain(name, opt)
opt = opt or {}
- local toolchain_name = toolchain.parsename(name) -- we need to ignore `@packagename`
+ local parseinfo = toolchain.parsename(name) -- we need to ignore `@packagename`
+ local toolchain_name = parseinfo.name
local info = project._toolchains()[toolchain_name]
if info == nil and opt.namespace then
+ local requirestr = parseinfo.requirestr
+ if requirestr then
+ toolchain_name = toolchain_name .. "[" .. requirestr .. "]"
+ end
info = project._toolchains()[opt.namespace .. "::" .. toolchain_name]
end
if info then