Skip to content

Commit 44b95ba

Browse files
committed
fix: use the os version when choosing gcc for llvm
1 parent 144da62 commit 44b95ba

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { setupGcc } from "../gcc/gcc"
1313
import { getVersion } from "../versions/versions"
1414
import { isUbuntu } from "../utils/env/isUbuntu"
1515
import { getLLVMPackageInfo } from "./llvm_url"
16+
import { ubuntuVersion } from "../utils/env/ubuntu_version"
1617

1718
export async function setupLLVM(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
1819
const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)
@@ -44,7 +45,8 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
4445
async function setupLLVMDeps(arch: string) {
4546
if (process.platform === "linux") {
4647
// install llvm build dependencies
47-
await setupGcc(getVersion("gcc", undefined), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
48+
const osVersion = await ubuntuVersion()
49+
await setupGcc(getVersion("gcc", undefined, osVersion), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
4850

4951
if (isUbuntu()) {
5052
await setupAptPack("libtinfo-dev")

src/versions/default_versions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const DefaultVersions: Record<string, string> = {
1515
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
1616
task: "3.18.0", // https://github.com/go-task/task/releases
1717
doxygen: isArch() ? "1.9.5-1" : "1.9.5", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/
18-
gcc: "12", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
18+
gcc: isArch() ? "11" : "12", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
1919
}
2020

2121
/// If an ubuntu versions is not in this map:

0 commit comments

Comments
 (0)