diff options
| author | ruki <[email protected]> | 2026-03-29 22:49:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-29 22:49:41 +0800 |
| commit | 1bccfc273af2b1d579d033324bca481e15c58653 (patch) | |
| tree | 192697793bd61d48b4423da0ac4a1eab804d80dc /xmake/modules/utils/binary/deplibs.lua | |
| parent | f4513cc28aa778e1ad0d050511cc7e295fe81e32 (diff) | |
fix const limit on lua5.5
Diffstat (limited to 'xmake/modules/utils/binary/deplibs.lua')
| -rw-r--r-- | xmake/modules/utils/binary/deplibs.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/utils/binary/deplibs.lua b/xmake/modules/utils/binary/deplibs.lua index 1de8056fd..e1a9a776d 100644 --- a/xmake/modules/utils/binary/deplibs.lua +++ b/xmake/modules/utils/binary/deplibs.lua @@ -44,6 +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 + local line = line line = line:trim() if not line:startswith("Dump of file") and line:endswith(".dll") then depends = depends or {} @@ -71,6 +72,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 + local line = line line = line:trim() if not line:endswith(":") then if plat == "windows" or plat == "mingw" then @@ -126,6 +128,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,6 +205,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 + local line = line line = line:trim() if not line:endswith(":") then local filename = line:match(".-%.dylib") or line:match(".-%.framework") @@ -344,6 +348,7 @@ function _get_plain_depends(binaryfile, opt) if depends and opt.resolve_path then local result = {} for _, dependfile in ipairs(depends) do + local dependfile = dependfile dependfile = _resolve_filepath(binaryfile, dependfile, opt) if dependfile then table.insert(result, dependfile) |
