fix: add the exe extension for CC/CXX

This commit is contained in:
Amin Yahyaabadi 2022-05-12 18:42:49 -07:00
parent c8f6527003
commit 209bb28e11
4 changed files with 6 additions and 5 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

@ -9,6 +9,7 @@ import { setupMacOSSDK } from "../macos-sdk/macos-sdk"
import path from "path"
import { warning, info } from "../utils/io/io"
import { isGitHubCI } from "../utils/env/isci"
import { addBinExtension } from "../utils/extension/extension"
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export async function setupGcc(version: string, _setupDir: string, arch: string) {
@ -83,7 +84,7 @@ async function activateGcc(version: string, binDir: string) {
// )
if (process.platform === "win32") {
promises.push(addEnv("CC", `${binDir}/gcc`), addEnv("CXX", `${binDir}/g++`))
promises.push(addEnv("CC", addBinExtension(`${binDir}/gcc`)), addEnv("CXX", addBinExtension(`${binDir}/g++`)))
} else {
const majorVersion = semverMajor(semverCoerce(version) ?? version)
if (majorVersion >= 5) {

View File

@ -314,8 +314,8 @@ export async function activateLLVM(directory: string, versionGiven: string) {
addEnv("CPPFLAGS", `-I'${directory}/include'`),
// compiler paths
addEnv("CC", `${directory}/bin/clang`),
addEnv("CXX", `${directory}/bin/clang++`),
addEnv("CC", addBinExtension(`${directory}/bin/clang`)),
addEnv("CXX", addBinExtension(`${directory}/bin/clang++`)),
addEnv("LIBRARY_PATH", `${directory}/lib`),