fix: only escape LDFLAGS and CPPFLAGS

This partially reverts 41d161c37f
This commit is contained in:
Amin Yahyaabadi 2022-05-11 17:17:54 -07:00
parent 4109838bca
commit 3eb3fc16a7
4 changed files with 6 additions and 7 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

@ -317,8 +317,8 @@ export async function activateLLVM(directory: string, versionGiven: string) {
}
}
addEnv("LDFLAGS", `-L${directory}/lib`)
addEnv("CPPFLAGS", `-I${directory}/include`)
addEnv("LDFLAGS", `-L${directory}/lib`, true)
addEnv("CPPFLAGS", `-I${directory}/include`, true)
addEnv("CC", `${directory}/bin/clang`)
addEnv("CXX", `${directory}/bin/clang++`)

View File

@ -8,7 +8,7 @@ import { delimiter } from "path"
import { escapeSpace } from "../path/escape_space"
/** An add path function that works locally or inside GitHub Actions */
export function addEnv(name: string, valGiven: string | undefined, shouldEscapeSpace: boolean = true) {
export function addEnv(name: string, valGiven: string | undefined, shouldEscapeSpace: boolean = false) {
const val = shouldEscapeSpace ? escapeSpace(valGiven) : valGiven
try {
if (isGitHubCI()) {
@ -28,8 +28,7 @@ export function addEnv(name: string, valGiven: string | undefined, shouldEscapeS
}
/** An add path function that works locally or inside GitHub Actions */
export function addPath(pathGiven: string, shouldEscapeSpace: boolean = true) {
const path = shouldEscapeSpace ? escapeSpace(pathGiven) : pathGiven
export function addPath(path: string) {
process.env.PATH = `${path}${delimiter}${process.env.PATH}`
try {
if (isGitHubCI()) {