Merge pull request #171 from aminya/cpath-remove [skip ci]

This commit is contained in:
Amin Yahyaabadi 2023-05-23 21:18:22 -07:00 committed by GitHub
commit 0fbc8e49a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 20 deletions

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

View File

@ -93,15 +93,16 @@ export async function activateLLVM(directory: string, versionGiven: string) {
setupMacOSSDK(),
]
// windows builds fail with llvm's CPATH
if (process.platform !== "win32") {
const llvmMajor = semverMajor(version)
if (await pathExists(`${directory}/lib/clang/${version}/include`)) {
promises.push(addEnv("CPATH", `${directory}/lib/clang/${version}/include`))
} else if (await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)) {
promises.push(addEnv("CPATH", `${directory}/lib/clang/${llvmMajor}/include`))
}
}
// TODO Causes issues with clangd
// TODO Windows builds fail with llvm's CPATH
// if (process.platform !== "win32") {
// const llvmMajor = semverMajor(version)
// if (await pathExists(`${directory}/lib/clang/${version}/include`)) {
// promises.push(addEnv("CPATH", `${directory}/lib/clang/${version}/include`))
// } else if (await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)) {
// promises.push(addEnv("CPATH", `${directory}/lib/clang/${llvmMajor}/include`))
// }
// }
if (isUbuntu()) {
promises.push(

View File

@ -214,7 +214,7 @@ export async function main(args: string[]): Promise<number> {
const installationInfo = await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch)
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", "")
}