Skip to content

Commit 5550e03

Browse files
committed
fix lua
1 parent 3d320bb commit 5550e03

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

release.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function _get_require_libs(llvm_archive)
2121

2222
os.mkdir("package")
2323
os.mkdir("package/backup")
24-
archive.extract(llvm_archive, "package/llvm")
24+
archive.extract(path.absolute(llvm_archive), "package/llvm")
2525
-- Use --project to specify the clice project and avoid xmake finding parent directory xmake.lua
2626
local argv = {
2727
"config",
@@ -61,6 +61,7 @@ function _get_require_libs(llvm_archive)
6161
}
6262
end
6363
print("build %d libs, unused %d libs", #libs, #unused_libs)
64+
return unused_libs
6465
end
6566

6667
-- @param llvm_archive string
@@ -70,7 +71,7 @@ function _reduce_package_size(llvm_archive, unused_libs)
7071
os.tryrm("build")
7172
local workdir = "build/.pack"
7273
os.mkdir(workdir)
73-
archive.extract(llvm_archive, workdir)
74+
archive.extract(path.absolute(llvm_archive), workdir)
7475

7576
for _, lib in ipairs(unused_libs) do
7677
os.rm(path.join(workdir, format("lib/*%s*", lib)))
@@ -133,7 +134,7 @@ function main()
133134
local unused_libs
134135
for _, llvm_archive in ipairs(origin_files) do
135136
if llvm_archive:find("releasedbg") and llvm_archive:find("lto_n") then
136-
unused_libs = _get_require_libs(path.absolute(llvm_archive))
137+
unused_libs = _get_require_libs(llvm_archive)
137138
break
138139
end
139140
end

0 commit comments

Comments
 (0)