Browse Source

Generate correct LLVM package name regardless of the current operating system

pull/1525/head
josetr 5 years ago
parent
commit
e22b8cb8a6
  1. 4
      build/Helpers.lua
  2. 2
      build/scripts/LLVM.lua

4
build/Helpers.lua

@ -51,6 +51,7 @@ function is_64_bits_mono_runtime() @@ -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() @@ -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\\.]+")

2
build/scripts/LLVM.lua

@ -178,7 +178,7 @@ function extract_tar_gz(archive, dest_dir) @@ -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()

Loading…
Cancel
Save