From efc77924cc3ac930354ace0165bb3dc70ce79bac Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Sun, 10 Dec 2017 16:02:38 +0200 Subject: [PATCH] Add compiler/abi information to LLVM package names on linux. Compiler kind (always gcc for now) and version (4.8/4.9/5/6/7) is now always included in llvm package name. Additionally if `--no-cxx11-abi` flag is passed to premake then package name will end wiht "-no-cxx11". Prebuilt LLVM binaries package for CI needs renaming to `llvm-9bde5f-linux-x64-gcc-4.8-Release.tar.xz`. --- build/scripts/LLVM.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/build/scripts/LLVM.lua b/build/scripts/LLVM.lua index 7f60395d..4ce1faf6 100644 --- a/build/scripts/LLVM.lua +++ b/build/scripts/LLVM.lua @@ -112,12 +112,29 @@ function get_llvm_package_name(rev, conf, arch) local toolset = get_toolset_configuration_name(arch) table.insert(components, toolset) + if os.istarget("linux") then + local version = GccVersion() + if version < "5.0.0" then + -- Minor version matters only with gcc 4.8/4.9 + version = string.match(version, "%d+.%d+") + else + version = string.match(version, "%d+") + end + table.insert(components, "gcc-"..version) + end + if not conf then conf = get_llvm_configuration_name() end table.insert(components, conf) + if os.istarget("linux") then + if GccVersion() >= "4.9.0" and not UseCxx11ABI() then + table.insert(components, "no-cxx11") + end + end + return table.concat(components, "-") end @@ -193,7 +210,7 @@ function cmake(gen, conf, builddir, options) if options == nil then options = "" end - if os.istarget("linux") and _OPTIONS["no-cxx11-abi"] ~= nil then + if not UseCxx11ABI() then options = options.." -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0'" end