Skip to content

Commit e22b8cb

Browse files
committed
Generate correct LLVM package name regardless of the current operating system
1 parent 9e80865 commit e22b8cb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

build/Helpers.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function is_64_bits_mono_runtime()
5151
local arch = string.match(result, "Architecture:%s*([%w]+)")
5252
return arch == "amd64"
5353
end
54+
default_gcc_version = "9.0.0"
5455

5556
function target_architecture()
5657
if _ACTION == "netcore" then
@@ -252,6 +253,9 @@ function GccVersion()
252253
compiler = "gcc"
253254
end
254255
local out = os.outputof(compiler.." -v")
256+
if out == nil then
257+
return default_gcc_version
258+
end
255259
local version = string.match(out, "gcc version [0-9\\.]+")
256260
if version == nil then
257261
version = string.match(out, "clang version [0-9\\.]+")

build/scripts/LLVM.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function extract_tar_gz(archive, dest_dir)
178178
return execute_or_die(string.format("tar xf %s -C %s", archive, dest_dir), true)
179179
end
180180

181-
local use_7zip = os.ishost("windows")
181+
local use_7zip = os.istarget("windows")
182182
local archive_ext = use_7zip and ".7z" or ".tar.xz"
183183

184184
function download_llvm()

0 commit comments

Comments
 (0)