Skip to content

Commit 4532f2e

Browse files
committed
fix: force installing LLVM via bottles
1 parent 4b9980f commit 4532f2e

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

dist/legacy/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/legacy/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/modern/setup-cpp.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs.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_brew_installer.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { installBrewPack } from "setup-brew"
44
import { rcOptions } from "../cli-options.ts"
55
import { majorLLVMVersion } from "./utils.ts"
66

7-
export function trySetupLLVMBrew(version: string, _setupDir: string, _arch: string) {
7+
export async function trySetupLLVMBrew(version: string, _setupDir: string, _arch: string) {
88
if (process.platform !== "darwin") {
99
return Promise.resolve(undefined)
1010
}
1111

1212
try {
13-
return setupLLVMBrew(version, _setupDir, _arch)
13+
return await setupLLVMBrew(version, _setupDir, _arch)
1414
} catch (err) {
1515
warning(`Failed to install llvm via brew: ${err}`)
1616
return undefined
@@ -19,7 +19,9 @@ export function trySetupLLVMBrew(version: string, _setupDir: string, _arch: stri
1919

2020
export async function setupLLVMBrew(version: string, _setupDir: string, _arch: string) {
2121
const majorVersion = majorLLVMVersion(version)
22-
const installInfo = await installBrewPack("llvm", `${majorVersion}`)
22+
23+
// install llvm via brew if a bottle is available for it
24+
const installInfo = await installBrewPack("llvm", `${majorVersion}`, { "force-bottle": true })
2325

2426
// add the bin directory to the PATH
2527
await addPath(installInfo.binDir, rcOptions)

0 commit comments

Comments
 (0)