mirror of https://github.com/aminya/setup-cpp
fix: install libtinfo5 for llvm 10 and older
This commit is contained in:
parent
7220394b68
commit
9be6087e95
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -28,7 +28,7 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
|
|||
|
||||
let depsPromise: Promise<void>
|
||||
if (!installedDeps) {
|
||||
depsPromise = setupLLVMDeps(arch)
|
||||
depsPromise = setupLLVMDeps(arch, version)
|
||||
// eslint-disable-next-line require-atomic-updates
|
||||
installedDeps = true
|
||||
} else {
|
||||
|
@ -42,14 +42,19 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
|
|||
return installationInfo
|
||||
}
|
||||
|
||||
async function setupLLVMDeps(arch: string) {
|
||||
async function setupLLVMDeps(arch: string, version: string) {
|
||||
if (process.platform === "linux") {
|
||||
// install llvm build dependencies
|
||||
const osVersion = await ubuntuVersion()
|
||||
await setupGcc(getVersion("gcc", undefined, osVersion), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
|
||||
|
||||
if (isUbuntu()) {
|
||||
await setupAptPack("libtinfo-dev")
|
||||
const majorVersion = parseInt(version.split(".")[0], 10)
|
||||
if (majorVersion <= 10) {
|
||||
await setupAptPack("libtinfo5")
|
||||
} else {
|
||||
await setupAptPack("libtinfo-dev")
|
||||
}
|
||||
}
|
||||
// TODO: install libtinfo on other distros
|
||||
// setupPacmanPack("ncurses")
|
||||
|
|
Loading…
Reference in New Issue