fix(cli): set cxxflags while WASI_SDK_PATH exists (#1955)
This commit is contained in:
parent
20e0983288
commit
09efd416e5
1 changed files with 7 additions and 0 deletions
|
@ -267,6 +267,13 @@ class Builder {
|
|||
) {
|
||||
this.envs.CFLAGS = `--sysroot=${this.envs.TARGET_SYSROOT}`
|
||||
}
|
||||
if (
|
||||
(process.env.CXX === 'clang++' &&
|
||||
(process.env.TARGET_CXX === 'clang++' || !process.env.TARGET_CXX)) ||
|
||||
process.env.TARGET_CXX === 'clang++'
|
||||
) {
|
||||
this.envs.CXXFLAGS = `--sysroot=${this.envs.TARGET_SYSROOT}`
|
||||
}
|
||||
} catch (e) {
|
||||
debug.warn('Pick cross toolchain failed', e as Error)
|
||||
// ignore, do nothing
|
||||
|
|
Loading…
Reference in a new issue