summaryrefslogtreecommitdiff
path: root/xmake/modules/lib
diff options
context:
space:
mode:
authorruki <[email protected]>2026-04-01 21:02:03 +0800
committerGitHub <[email protected]>2026-04-01 21:02:03 +0800
commit39fd35ea9d5d14079e4669b85423d488c9097cd4 (patch)
tree7d4452174422931fe8a56f49b2d349b4b7cc90b3 /xmake/modules/lib
parent75b084fa57f2fe00f369d9cac3878c03da43a68a (diff)
parentc63ac2d50545f2f58872c5be9a46d8fb5b3e8016 (diff)
Merge pull request #7437 from xmake-io/lua55
update to lua5.5
Diffstat (limited to 'xmake/modules/lib')
-rw-r--r--xmake/modules/lib/detect/check_importfiles.lua1
-rw-r--r--xmake/modules/lib/detect/find_toolname.lua1
-rw-r--r--xmake/modules/lib/detect/has_flags.lua2
3 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/lib/detect/check_importfiles.lua b/xmake/modules/lib/detect/check_importfiles.lua
index 844939891..d8c12d387 100644
--- a/xmake/modules/lib/detect/check_importfiles.lua
+++ b/xmake/modules/lib/detect/check_importfiles.lua
@@ -34,6 +34,7 @@ function main(names, opt)
verbose = true
end
for _, name in ipairs(names) do
+ local name = name
local kind
local parts = name:split("::")
if #parts == 2 then
diff --git a/xmake/modules/lib/detect/find_toolname.lua b/xmake/modules/lib/detect/find_toolname.lua
index 37f468c73..0b7ad1a9b 100644
--- a/xmake/modules/lib/detect/find_toolname.lua
+++ b/xmake/modules/lib/detect/find_toolname.lua
@@ -49,6 +49,7 @@ function _find_with_whole_name(program)
local partnames = {}
local names = path.filename(program):lower():split("%s")
for _, name in ipairs(names) do
+ local name = name
-- remove suffix: ".exe", e.g. "zig.exe cc"
name = _remove_suffix(name)
-- "zig c++" -> zig_cxx
diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua
index 8ac8e3385..a28b3e41a 100644
--- a/xmake/modules/lib/detect/has_flags.lua
+++ b/xmake/modules/lib/detect/has_flags.lua
@@ -106,7 +106,7 @@ function main(name, flags, opt)
-- split flag group, e.g. "-I /xxx" => {"-I", "/xxx"}
local results = {}
for _, flag in ipairs(checkflags) do
- flag = flag:trim()
+ local flag = flag:trim()
if #flag > 0 then
if flag:find(" ", 1, true) then
table.join2(results, os.argv(flag))