mirror of https://github.com/aminya/setup-cpp
fix: install libtinfo-dev for llvm on linux
This commit is contained in:
parent
8bb24cdcdc
commit
4c2c9d3660
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -244,17 +244,27 @@ async function getLLVMPackageInfo(version: string, platform: NodeJS.Platform, _a
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setupLLVM(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
|
export async function setupLLVM(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
|
||||||
const installationInfo = await setupBin("llvm", version, getLLVMPackageInfo, setupDir, arch)
|
const installationInfo = await _setupLLVM(version, setupDir, arch)
|
||||||
await activateLLVM(installationInfo.installDir ?? setupDir, version)
|
await activateLLVM(installationInfo.installDir ?? setupDir, version)
|
||||||
return installationInfo
|
return installationInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function activateLLVM(directory: string, versionGiven: string) {
|
let didInit = false
|
||||||
if (process.platform === "linux") {
|
async function _setupLLVM(version: string, setupDir: string, arch: string) {
|
||||||
// install llvm build dependencies
|
const installationInfo = await setupBin("llvm", version, getLLVMPackageInfo, setupDir, arch)
|
||||||
await setupAptPack("build-essential") // TODO(question) llvm needs ld. But does it need all the build-essential?
|
if (!didInit) {
|
||||||
|
if (process.platform === "linux") {
|
||||||
|
// install llvm build dependencies
|
||||||
|
await setupAptPack("build-essential") // TODO(question) llvm needs ld. But does it need all the build-essential?
|
||||||
|
await setupAptPack("libtinfo-dev")
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line require-atomic-updates
|
||||||
|
didInit = true
|
||||||
}
|
}
|
||||||
|
return installationInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function activateLLVM(directory: string, versionGiven: string) {
|
||||||
const version = semverCoerceIfInvalid(versionGiven)
|
const version = semverCoerceIfInvalid(versionGiven)
|
||||||
|
|
||||||
const lib = path.join(directory, "lib")
|
const lib = path.join(directory, "lib")
|
||||||
|
@ -295,7 +305,7 @@ export function setupClangTools(version: string, setupDir: string, arch: string)
|
||||||
if (isGitHubCI()) {
|
if (isGitHubCI()) {
|
||||||
addLLVMLoggingMatcher()
|
addLLVMLoggingMatcher()
|
||||||
}
|
}
|
||||||
return setupBin("llvm", version, getLLVMPackageInfo, setupDir, arch)
|
return _setupLLVM(version, setupDir, arch)
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLLVMLoggingMatcher() {
|
function addLLVMLoggingMatcher() {
|
||||||
|
|
Loading…
Reference in New Issue