Merge pull request #58 from aminya/gcc-alternatives [skip ci]

This commit is contained in:
Amin Yahyaabadi 2022-04-24 18:38:41 -07:00 committed by GitHub
commit 45e6488209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -100,6 +100,8 @@ async function activateGcc(version: string, binDir: string) {
if (process.platform === "linux") {
await updateAptAlternatives("cc", `${binDir}/gcc-${majorVersion}`)
await updateAptAlternatives("cxx", `${binDir}/g++-${majorVersion}`)
await updateAptAlternatives("gcc", `${binDir}/gcc-${majorVersion}`)
await updateAptAlternatives("g++", `${binDir}/g++-${majorVersion}`)
}
} else {
addEnv("CC", `${binDir}/gcc-${version}`)
@ -108,6 +110,8 @@ async function activateGcc(version: string, binDir: string) {
if (process.platform === "linux") {
await updateAptAlternatives("cc", `${binDir}/gcc-${version}`)
await updateAptAlternatives("cxx", `${binDir}/g++-${version}`)
await updateAptAlternatives("gcc", `${binDir}/gcc-${version}`)
await updateAptAlternatives("g++", `${binDir}/g++-${version}`)
}
}
}