Skip to content

Commit 2d754de

Browse files
committed
fix: install the latest gcc for using llvm
1 parent 9770308 commit 2d754de

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dist/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/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,8 @@ import { setupAptPack } from "../utils/setup/setupAptPack"
1313
import { warning } from "../utils/io/io"
1414
import { existsSync } from "fs"
1515
import { isGitHubCI } from "../utils/env/isci"
16+
import { setupGcc } from "../gcc/gcc"
17+
import { getVersion } from "../default_versions"
1618

1719
//================================================
1820
// Version
@@ -255,7 +257,7 @@ async function _setupLLVM(version: string, setupDir: string, arch: string) {
255257
if (!didInit) {
256258
if (process.platform === "linux") {
257259
// install llvm build dependencies
258-
await setupAptPack("build-essential") // TODO(question) llvm needs ld. But does it need all the build-essential?
260+
await setupGcc(getVersion("gcc", undefined), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
259261
await setupAptPack("libtinfo-dev")
260262
}
261263
// eslint-disable-next-line require-atomic-updates

0 commit comments

Comments
 (0)