fix(cli): set CC env if not existed (#1839)
This commit is contained in:
parent
0b74cf667e
commit
a87e4a6d95
1 changed files with 12 additions and 0 deletions
|
@ -227,6 +227,18 @@ class Builder {
|
||||||
'include/',
|
'include/',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
if (!process.env.CC && !process.env.TARGET_CC) {
|
||||||
|
this.envs[`CC`] = join(
|
||||||
|
toolchainPath,
|
||||||
|
'bin',
|
||||||
|
`${this.target.triple}-gcc`,
|
||||||
|
)
|
||||||
|
this.envs[`TARGET_CC`] = join(
|
||||||
|
toolchainPath,
|
||||||
|
'bin',
|
||||||
|
`${this.target.triple}-gcc`,
|
||||||
|
)
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
(process.env.CC === 'clang' &&
|
(process.env.CC === 'clang' &&
|
||||||
(process.env.TARGET_CC === 'clang' || !process.env.TARGET_CC)) ||
|
(process.env.TARGET_CC === 'clang' || !process.env.TARGET_CC)) ||
|
||||||
|
|
Loading…
Reference in a new issue