fix(cli): wasi targets linker envs (#2044)
This commit is contained in:
parent
6871b67589
commit
a2d78fadf9
2 changed files with 16 additions and 0 deletions
|
@ -544,6 +544,21 @@ class Builder {
|
|||
'bin',
|
||||
'wasm-ld',
|
||||
)
|
||||
this.envs.CARGO_TARGET_WASM32_WASIP1_LINKER = join(
|
||||
WASI_SDK_PATH,
|
||||
'bin',
|
||||
'wasm-ld',
|
||||
)
|
||||
this.envs.CARGO_TARGET_WASM32_WASIP1_THREADS_LINKER = join(
|
||||
WASI_SDK_PATH,
|
||||
'bin',
|
||||
'wasm-ld',
|
||||
)
|
||||
this.envs.CARGO_TARGET_WASM32_WASIP2_LINKER = join(
|
||||
WASI_SDK_PATH,
|
||||
'bin',
|
||||
'wasm-ld',
|
||||
)
|
||||
this.setEnvIfNotExists('CC', join(WASI_SDK_PATH, 'bin', 'clang'))
|
||||
this.setEnvIfNotExists('CXX', join(WASI_SDK_PATH, 'bin', 'clang++'))
|
||||
this.setEnvIfNotExists('AR', join(WASI_SDK_PATH, 'bin', 'ar'))
|
||||
|
|
|
@ -110,6 +110,7 @@ export interface Target {
|
|||
*/
|
||||
export function parseTriple(rawTriple: string): Target {
|
||||
if (
|
||||
rawTriple === 'wasm32-wasi' ||
|
||||
rawTriple === 'wasm32-wasi-preview1-threads' ||
|
||||
rawTriple.startsWith('wasm32-wasip')
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue