Skip to content

Commit e88b1a8

Browse files
committed
Fixed LLVM/Clang tar.gz archive extraction using 7-Zip on Windows.
1 parent f0d3e73 commit e88b1a8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build/scripts/LLVM.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function clone_llvm()
3434
print("Clang release: " .. clang_release)
3535

3636
if os.ishost("windows") then
37-
extract = extract_7z
37+
extract = extract_7z_tar_gz
3838
else
3939
extract = extract_tar_gz
4040
end
@@ -153,9 +153,15 @@ function get_7z_path()
153153
return "7z.exe"
154154
end
155155

156+
function extract_7z_tar_gz(archive, dest_dir)
157+
extract_7z(archive, dest_dir)
158+
local tar = string.sub(archive, 1, -4)
159+
extract_7z(tar, dest_dir)
160+
end
161+
156162
function extract_7z(archive, dest_dir)
157-
return execute_or_die(string.format("%s x %s -o%s -y", get_7z_path(),
158-
archive, dest_dir), true)
163+
return execute(string.format("%s x %s -o%s -y", get_7z_path(),
164+
archive, dest_dir), false)
159165
end
160166

161167
function extract_tar_xz(archive, dest_dir)

0 commit comments

Comments
 (0)