summaryrefslogtreecommitdiff
path: root/xmake/modules/lib
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-29 22:49:37 +0800
committerruki <[email protected]>2026-03-29 22:49:41 +0800
commit1bccfc273af2b1d579d033324bca481e15c58653 (patch)
tree192697793bd61d48b4423da0ac4a1eab804d80dc /xmake/modules/lib
parentf4513cc28aa778e1ad0d050511cc7e295fe81e32 (diff)
fix const limit on 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.lua1
3 files changed, 3 insertions, 0 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..61a44f8c1 100644
--- a/xmake/modules/lib/detect/has_flags.lua
+++ b/xmake/modules/lib/detect/has_flags.lua
@@ -106,6 +106,7 @@ function main(name, flags, opt)
-- split flag group, e.g. "-I /xxx" => {"-I", "/xxx"}
local results = {}
for _, flag in ipairs(checkflags) do
+ local flag = flag
flag = flag:trim()
if #flag > 0 then
if flag:find(" ", 1, true) then