@@ -21,10 +21,10 @@ export async function setupGcc(version: string, _setupDir: string, arch: string)
2121 await setupChocoPack ( "mingw" , version )
2222 if ( arch === "x64" && existsSync ( "C:/tools/mingw64/bin" ) ) {
2323 binDir = "C:/tools/mingw64/bin"
24- addPath ( binDir )
24+ await addPath ( binDir )
2525 } else if ( arch === "ia32" && existsSync ( "C:/tools/mingw32/bin" ) ) {
2626 binDir = "C:/tools/mingw32/bin"
27- addPath ( binDir )
27+ await addPath ( binDir )
2828 } else if ( existsSync ( `${ process . env . ChocolateyInstall ?? "C:/ProgramData/chocolatey" } /bin/g++.exe` ) ) {
2929 binDir = `${ process . env . ChocolateyInstall ?? "C:/ProgramData/chocolatey" } /bin`
3030 }
@@ -72,19 +72,19 @@ async function activateGcc(version: string, binDir: string) {
7272 // const ld = process.env.LD_LIBRARY_PATH ?? ""
7373 // const dyld = process.env.DYLD_LIBRARY_PATH ?? ""
7474 // // Setup gcc as the compiler
75- // addEnv("LD_LIBRARY_PATH", `${installDir}/lib${path.delimiter}${ld}`)
76- // addEnv("DYLD_LIBRARY_PATH", `${installDir}/lib${path.delimiter}${dyld}`)
77- // addEnv("CPATH", `${installDir}/lib/gcc/${majorVersion}/include`)
78- // addEnv("LDFLAGS", `-L${installDir}/lib`)
79- // addEnv("CPPFLAGS", `-I${installDir}/include`)
75+ // await addEnv("LD_LIBRARY_PATH", `${installDir}/lib${path.delimiter}${ld}`)
76+ // await addEnv("DYLD_LIBRARY_PATH", `${installDir}/lib${path.delimiter}${dyld}`)
77+ // await addEnv("CPATH", `${installDir}/lib/gcc/${majorVersion}/include`)
78+ // await addEnv("LDFLAGS", `-L${installDir}/lib`)
79+ // await addEnv("CPPFLAGS", `-I${installDir}/include`)
8080 if ( process . platform === "win32" ) {
81- addEnv ( "CC" , `${ binDir } /gcc` )
82- addEnv ( "CXX" , `${ binDir } /g++` )
81+ await addEnv ( "CC" , `${ binDir } /gcc` )
82+ await addEnv ( "CXX" , `${ binDir } /g++` )
8383 } else {
8484 const majorVersion = semverMajor ( semverCoerce ( version ) ?? version )
8585 if ( majorVersion >= 5 ) {
86- addEnv ( "CC" , `${ binDir } /gcc-${ majorVersion } ` )
87- addEnv ( "CXX" , `${ binDir } /g++-${ majorVersion } ` )
86+ await addEnv ( "CC" , `${ binDir } /gcc-${ majorVersion } ` )
87+ await addEnv ( "CXX" , `${ binDir } /g++-${ majorVersion } ` )
8888
8989 if ( process . platform === "linux" ) {
9090 await updateAptAlternatives ( "cc" , `${ binDir } /gcc-${ majorVersion } ` )
@@ -93,8 +93,8 @@ async function activateGcc(version: string, binDir: string) {
9393 await updateAptAlternatives ( "g++" , `${ binDir } /g++-${ majorVersion } ` )
9494 }
9595 } else {
96- addEnv ( "CC" , `${ binDir } /gcc-${ version } ` )
97- addEnv ( "CXX" , `${ binDir } /g++-${ version } ` )
96+ await addEnv ( "CC" , `${ binDir } /gcc-${ version } ` )
97+ await addEnv ( "CXX" , `${ binDir } /g++-${ version } ` )
9898
9999 if ( process . platform === "linux" ) {
100100 await updateAptAlternatives ( "cc" , `${ binDir } /gcc-${ version } ` )
0 commit comments