diff options
| author | ruki <[email protected]> | 2026-04-01 21:02:03 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-01 21:02:03 +0800 |
| commit | 39fd35ea9d5d14079e4669b85423d488c9097cd4 (patch) | |
| tree | 7d4452174422931fe8a56f49b2d349b4b7cc90b3 /xmake/modules/utils | |
| parent | 75b084fa57f2fe00f369d9cac3878c03da43a68a (diff) | |
| parent | c63ac2d50545f2f58872c5be9a46d8fb5b3e8016 (diff) | |
Merge pull request #7437 from xmake-io/lua55
update to lua5.5
Diffstat (limited to 'xmake/modules/utils')
| -rw-r--r-- | xmake/modules/utils/binary/deplibs.lua | 9 | ||||
| -rw-r--r-- | xmake/modules/utils/binary/rpath.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/utils/run_script.lua | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/xmake/modules/utils/binary/deplibs.lua b/xmake/modules/utils/binary/deplibs.lua index 1de8056fd..56029ef20 100644 --- a/xmake/modules/utils/binary/deplibs.lua +++ b/xmake/modules/utils/binary/deplibs.lua @@ -44,7 +44,7 @@ function _get_depends_by_dumpbin(binaryfile, opt) local result = try { function () return os.iorunv(dumpbin.program, {"/dependents", "/nologo", binaryfile}) end } if result then for _, line in ipairs(result:split("\n")) do - line = line:trim() + local line = line:trim() if not line:startswith("Dump of file") and line:endswith(".dll") then depends = depends or {} table.insert(depends, line) @@ -71,7 +71,7 @@ function _get_depends_by_objdump(binaryfile, opt) local result = try { function () return os.iorunv(objdump.program, argv) end } if result then for _, line in ipairs(result:split("\n")) do - line = line:trim() + local line = line:trim() if not line:endswith(":") then if plat == "windows" or plat == "mingw" then if line:startswith("DLL Name:") then @@ -126,6 +126,7 @@ function _get_depends_by_ldd(binaryfile, opt) local result = try { function () return os.iorunv(ldd.program, {binaryfile}) end } if result then for _, line in ipairs(result:split("\n")) do + local line = line local splitinfo = line:split("=>") line = splitinfo[2] if not line or line:find("not found", 1, true) then @@ -202,7 +203,7 @@ function _get_depends_by_otool(binaryfile, opt) local result = try { function () return os.iorunv(otool.program, {"-L", binaryfile}) end } if result then for _, line in ipairs(result:split("\n")) do - line = line:trim() + local line = line:trim() if not line:endswith(":") then local filename = line:match(".-%.dylib") or line:match(".-%.framework") if filename then @@ -344,7 +345,7 @@ function _get_plain_depends(binaryfile, opt) if depends and opt.resolve_path then local result = {} for _, dependfile in ipairs(depends) do - dependfile = _resolve_filepath(binaryfile, dependfile, opt) + local dependfile = _resolve_filepath(binaryfile, dependfile, opt) if dependfile then table.insert(result, dependfile) end diff --git a/xmake/modules/utils/binary/rpath.lua b/xmake/modules/utils/binary/rpath.lua index 33cab5a43..2e74443ad 100644 --- a/xmake/modules/utils/binary/rpath.lua +++ b/xmake/modules/utils/binary/rpath.lua @@ -55,7 +55,7 @@ function _get_rpath_list_by_objdump(binaryfile, opt) if result then local cmd = false for _, line in ipairs(result:split("\n")) do - line = line:trim() + local line = line:trim() if plat == "macosx" or plat == "iphoneos" or plat == "appletvos" or plat == "watchos" then if not cmd and line:find("cmd LC_RPATH", 1, true) then cmd = true diff --git a/xmake/modules/utils/run_script.lua b/xmake/modules/utils/run_script.lua index e6f8469f6..057ea57cd 100644 --- a/xmake/modules/utils/run_script.lua +++ b/xmake/modules/utils/run_script.lua @@ -191,6 +191,7 @@ function main(script, opt) if opt.thread then local argv for _, arg in ipairs(opt.arguments) do + local arg = arg argv = argv or {} if path.instance_of(arg) then arg = tostring(arg) |
