From e22b8cb8a694e491dddf039c22eacce055b63553 Mon Sep 17 00:00:00 2001 From: josetr <37419832+josetr@users.noreply.github.com> Date: Sun, 22 Nov 2020 19:40:37 +0000 Subject: [PATCH] Generate correct LLVM package name regardless of the current operating system --- build/Helpers.lua | 4 ++++ build/scripts/LLVM.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/Helpers.lua b/build/Helpers.lua index 27a5f18d..12ac33e5 100644 --- a/build/Helpers.lua +++ b/build/Helpers.lua @@ -51,6 +51,7 @@ function is_64_bits_mono_runtime() local arch = string.match(result, "Architecture:%s*([%w]+)") return arch == "amd64" end +default_gcc_version = "9.0.0" function target_architecture() if _ACTION == "netcore" then @@ -252,6 +253,9 @@ function GccVersion() compiler = "gcc" end local out = os.outputof(compiler.." -v") + if out == nil then + return default_gcc_version + end local version = string.match(out, "gcc version [0-9\\.]+") if version == nil then version = string.match(out, "clang version [0-9\\.]+") diff --git a/build/scripts/LLVM.lua b/build/scripts/LLVM.lua index 6682e138..5641761a 100644 --- a/build/scripts/LLVM.lua +++ b/build/scripts/LLVM.lua @@ -178,7 +178,7 @@ function extract_tar_gz(archive, dest_dir) return execute_or_die(string.format("tar xf %s -C %s", archive, dest_dir), true) end -local use_7zip = os.ishost("windows") +local use_7zip = os.istarget("windows") local archive_ext = use_7zip and ".7z" or ".tar.xz" function download_llvm()