Skip to content

Commit 1743f7e

Browse files
authored
Merge pull request #1024 from rokups/per-toolchain-llvm-packages
Add compiler/abi information to LLVM package names on linux.
2 parents 3dba1eb + efc7792 commit 1743f7e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

build/scripts/LLVM.lua

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,29 @@ function get_llvm_package_name(rev, conf, arch)
112112
local toolset = get_toolset_configuration_name(arch)
113113
table.insert(components, toolset)
114114

115+
if os.istarget("linux") then
116+
local version = GccVersion()
117+
if version < "5.0.0" then
118+
-- Minor version matters only with gcc 4.8/4.9
119+
version = string.match(version, "%d+.%d+")
120+
else
121+
version = string.match(version, "%d+")
122+
end
123+
table.insert(components, "gcc-"..version)
124+
end
125+
115126
if not conf then
116127
conf = get_llvm_configuration_name()
117128
end
118129

119130
table.insert(components, conf)
120131

132+
if os.istarget("linux") then
133+
if GccVersion() >= "4.9.0" and not UseCxx11ABI() then
134+
table.insert(components, "no-cxx11")
135+
end
136+
end
137+
121138
return table.concat(components, "-")
122139
end
123140

@@ -193,7 +210,7 @@ function cmake(gen, conf, builddir, options)
193210
if options == nil then
194211
options = ""
195212
end
196-
if os.istarget("linux") and _OPTIONS["no-cxx11-abi"] ~= nil then
213+
if not UseCxx11ABI() then
197214
options = options.." -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0'"
198215
end
199216

0 commit comments

Comments
 (0)