Skip to content

Commit

Permalink
fix(cli): set cxxflags while WASI_SDK_PATH exists (#1955)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Feb 17, 2024
1 parent 20e0983 commit 09efd41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/src/api/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09efd41

Please sign in to comment.