Skip to content

Commit e41547f

Browse files
authored
Merge pull request #150 from aminya/libtinfo [skip ci]
2 parents 7220394 + 9be6087 commit e41547f

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

dist/node12/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node12/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/llvm/llvm.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
2828

2929
let depsPromise: Promise<void>
3030
if (!installedDeps) {
31-
depsPromise = setupLLVMDeps(arch)
31+
depsPromise = setupLLVMDeps(arch, version)
3232
// eslint-disable-next-line require-atomic-updates
3333
installedDeps = true
3434
} else {
@@ -42,14 +42,19 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
4242
return installationInfo
4343
}
4444

45-
async function setupLLVMDeps(arch: string) {
45+
async function setupLLVMDeps(arch: string, version: string) {
4646
if (process.platform === "linux") {
4747
// install llvm build dependencies
4848
const osVersion = await ubuntuVersion()
4949
await setupGcc(getVersion("gcc", undefined, osVersion), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
5050

5151
if (isUbuntu()) {
52-
await setupAptPack("libtinfo-dev")
52+
const majorVersion = parseInt(version.split(".")[0], 10)
53+
if (majorVersion <= 10) {
54+
await setupAptPack("libtinfo5")
55+
} else {
56+
await setupAptPack("libtinfo-dev")
57+
}
5358
}
5459
// TODO: install libtinfo on other distros
5560
// setupPacmanPack("ncurses")

0 commit comments

Comments
 (0)