mirror of https://github.com/aminya/setup-cpp
fix: add the exe extension for CC/CXX
This commit is contained in:
parent
c8f6527003
commit
209bb28e11
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -9,6 +9,7 @@ import { setupMacOSSDK } from "../macos-sdk/macos-sdk"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import { warning, info } from "../utils/io/io"
|
import { warning, info } from "../utils/io/io"
|
||||||
import { isGitHubCI } from "../utils/env/isci"
|
import { isGitHubCI } from "../utils/env/isci"
|
||||||
|
import { addBinExtension } from "../utils/extension/extension"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export async function setupGcc(version: string, _setupDir: string, arch: string) {
|
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") {
|
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 {
|
} else {
|
||||||
const majorVersion = semverMajor(semverCoerce(version) ?? version)
|
const majorVersion = semverMajor(semverCoerce(version) ?? version)
|
||||||
if (majorVersion >= 5) {
|
if (majorVersion >= 5) {
|
||||||
|
|
|
@ -314,8 +314,8 @@ export async function activateLLVM(directory: string, versionGiven: string) {
|
||||||
addEnv("CPPFLAGS", `-I'${directory}/include'`),
|
addEnv("CPPFLAGS", `-I'${directory}/include'`),
|
||||||
|
|
||||||
// compiler paths
|
// compiler paths
|
||||||
addEnv("CC", `${directory}/bin/clang`),
|
addEnv("CC", addBinExtension(`${directory}/bin/clang`)),
|
||||||
addEnv("CXX", `${directory}/bin/clang++`),
|
addEnv("CXX", addBinExtension(`${directory}/bin/clang++`)),
|
||||||
|
|
||||||
addEnv("LIBRARY_PATH", `${directory}/lib`),
|
addEnv("LIBRARY_PATH", `${directory}/lib`),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue