Skip to content

Commit 60eecce

Browse files
committed
fix: add the bin directory to the path for llvm installer
1 parent c3a7043 commit 60eecce

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

dist/actions/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/actions/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/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.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/modern/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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { execRoot } from "admina"
22
import { GITHUB_ACTIONS } from "ci-info"
33
import { info, warning } from "ci-log"
4-
import { ExecaReturnValue, execa } from "execa"
4+
import { execa } from "execa"
55
import { promises } from "fs"
66
const { readFile, writeFile, chmod } = promises
77
import memoize from "micro-memoize"
@@ -10,7 +10,7 @@ import { pathExists } from "path-exists"
1010
import { addExeExt, join } from "patha"
1111
import { setupGcc } from "../gcc/gcc"
1212
import { setupMacOSSDK } from "../macos-sdk/macos-sdk"
13-
import { addEnv } from "../utils/env/addEnv"
13+
import { addEnv, addPath } from "../utils/env/addEnv"
1414
import { isUbuntu } from "../utils/env/isUbuntu"
1515
import { ubuntuVersion } from "../utils/env/ubuntu_version"
1616
import { hasNala, setupAptPack, updateAptAlternatives } from "../utils/setup/setupAptPack"
@@ -69,6 +69,8 @@ async function setupLLVMApt(majorVersion: number): Promise<InstallationInfo> {
6969
shell: true,
7070
})
7171

72+
await addPath(`${installationFolder}/bin`)
73+
7274
return {
7375
installDir: `${installationFolder}`,
7476
binDir: `${installationFolder}/bin`,
@@ -116,18 +118,16 @@ async function setupLLVMDeps_raw(arch: string) {
116118
const setupLLVMDeps = memoize(setupLLVMDeps_raw, { isPromise: true })
117119

118120
export async function activateLLVM(directory: string) {
119-
const lib = join(directory, "lib")
120-
121121
const ld = process.env.LD_LIBRARY_PATH ?? ""
122122
const dyld = process.env.DYLD_LIBRARY_PATH ?? ""
123123

124-
const actPromises: Promise<void | ExecaReturnValue<string>>[] = [
124+
const actPromises: Promise<any>[] = [
125125
// the output of this action
126126
addEnv("LLVM_PATH", directory),
127127

128128
// Setup LLVM as the compiler
129-
addEnv("LD_LIBRARY_PATH", `${lib}${delimiter}${ld}`),
130-
addEnv("DYLD_LIBRARY_PATH", `${lib}${delimiter}${dyld}`),
129+
addEnv("LD_LIBRARY_PATH", `${directory}/lib${delimiter}${ld}`),
130+
addEnv("DYLD_LIBRARY_PATH", `${directory}/lib${delimiter}${dyld}`),
131131

132132
// compiler flags
133133
addEnv("LDFLAGS", `-L"${directory}/lib"`),

0 commit comments

Comments
 (0)