mirror of https://github.com/aminya/setup-cpp
fix: do not set CPATH when using LLVM
This commit is contained in:
parent
8c72d55c11
commit
5959d53e9f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -93,15 +93,16 @@ export async function activateLLVM(directory: string, versionGiven: string) {
|
||||||
setupMacOSSDK(),
|
setupMacOSSDK(),
|
||||||
]
|
]
|
||||||
|
|
||||||
// windows builds fail with llvm's CPATH
|
// TODO Causes issues with clangd
|
||||||
if (process.platform !== "win32") {
|
// TODO Windows builds fail with llvm's CPATH
|
||||||
const llvmMajor = semverMajor(version)
|
// if (process.platform !== "win32") {
|
||||||
if (await pathExists(`${directory}/lib/clang/${version}/include`)) {
|
// const llvmMajor = semverMajor(version)
|
||||||
promises.push(addEnv("CPATH", `${directory}/lib/clang/${version}/include`))
|
// if (await pathExists(`${directory}/lib/clang/${version}/include`)) {
|
||||||
} else if (await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)) {
|
// promises.push(addEnv("CPATH", `${directory}/lib/clang/${version}/include`))
|
||||||
promises.push(addEnv("CPATH", `${directory}/lib/clang/${llvmMajor}/include`))
|
// } else if (await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)) {
|
||||||
}
|
// promises.push(addEnv("CPATH", `${directory}/lib/clang/${llvmMajor}/include`))
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
promises.push(
|
promises.push(
|
||||||
|
|
|
@ -214,7 +214,7 @@ export async function main(args: string[]): Promise<number> {
|
||||||
const installationInfo = await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch)
|
const installationInfo = await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch)
|
||||||
|
|
||||||
if (hasLLVM) {
|
if (hasLLVM) {
|
||||||
// remove the CPPFLAGS of LLVM that include the LLVM headers
|
// remove back the added CPPFLAGS of LLVM that include the LLVM headers
|
||||||
await addEnv("CPPFLAGS", "")
|
await addEnv("CPPFLAGS", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue