mirror of https://github.com/aminya/setup-cpp
feat: add activateLLVM
This commit is contained in:
parent
03447fbb65
commit
b9ce5945b7
|
@ -216,12 +216,9 @@ export function getUrl(platform: string, version: string): string | null | Promi
|
|||
}
|
||||
|
||||
//================================================
|
||||
// Action
|
||||
// Exports
|
||||
//================================================
|
||||
|
||||
const DEFAULT_NIX_DIRECTORY = "./llvm"
|
||||
const DEFAULT_WIN32_DIRECTORY = "C:/Program Files/LLVM"
|
||||
|
||||
async function getLLVMPackageInfo(version: string, platform: NodeJS.Platform): Promise<PackageInfo> {
|
||||
const [specificVersion, url] = await getSpecificVersionAndUrl(VERSIONS, platform, version, getUrl)
|
||||
core.setOutput("version", specificVersion)
|
||||
|
@ -233,6 +230,9 @@ async function getLLVMPackageInfo(version: string, platform: NodeJS.Platform): P
|
|||
}
|
||||
}
|
||||
|
||||
const DEFAULT_NIX_DIRECTORY = "./llvm"
|
||||
const DEFAULT_WIN32_DIRECTORY = "C:/Program Files/LLVM"
|
||||
|
||||
export async function setupLLVM(
|
||||
version: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
@ -249,7 +249,11 @@ export async function setupLLVM(
|
|||
|
||||
const installationInfo = await setupBin("llvm", version, getLLVMPackageInfo, directory)
|
||||
|
||||
// Adding environment variables
|
||||
await activateLLVM(directory, version)
|
||||
return installationInfo
|
||||
}
|
||||
|
||||
export async function activateLLVM(directory: string, version: string) {
|
||||
const lib = path.join(directory, "lib")
|
||||
|
||||
const ld = process.env.LD_LIBRARY_PATH ?? ""
|
||||
|
@ -284,6 +288,4 @@ export async function setupLLVM(
|
|||
core.error(e as Error | string)
|
||||
}
|
||||
}
|
||||
|
||||
return installationInfo
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue