fix(cli): migrate to latest wasm sjlj (#2806)

This commit is contained in:
LongYinan 2025-07-24 20:23:27 +08:00 committed by GitHub
parent d450209efd
commit 02bd12a724
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 14 deletions

View File

@ -79,8 +79,7 @@
"js-yaml": "^4.1.0",
"lodash-es": "^4.17.21",
"semver": "^7.7.1",
"typanion": "^3.14.0",
"wasm-sjlj": "^1.0.6"
"typanion": "^3.14.0"
},
"devDependencies": {
"@emnapi/core": "^1.4.0",

View File

@ -6,7 +6,6 @@ import { homedir } from 'node:os'
import { parse, join, resolve } from 'node:path'
import * as colors from 'colorette'
import { include as setjmpInclude, lib as setjmpLib } from 'wasm-sjlj'
import { BuildOptions as RawBuildOptions } from '../def/build.js'
import {
@ -591,7 +590,6 @@ class Builder {
'wasm32-wasi-threads',
)
this.envs.EMNAPI_LINK_DIR = emnapi
this.envs.SETJMP_LINK_DIR = setjmpLib
const { WASI_SDK_PATH } = process.env
if (WASI_SDK_PATH && existsSync(WASI_SDK_PATH)) {
@ -627,11 +625,11 @@ class Builder {
)
this.setEnvIfNotExists(
'TARGET_CFLAGS',
`--target=wasm32-wasi-threads --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -pthread -mllvm -wasm-enable-sjlj -I${setjmpInclude}`,
`--target=wasm32-wasi-threads --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -pthread -mllvm -wasm-enable-sjlj -lsetjmp`,
)
this.setEnvIfNotExists(
'TARGET_CXXFLAGS',
`--target=wasm32-wasi-threads --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -pthread -mllvm -wasm-enable-sjlj -I${setjmpInclude}`,
`--target=wasm32-wasi-threads --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot -pthread -mllvm -wasm-enable-sjlj -lsetjmp`,
)
this.setEnvIfNotExists(
`TARGET_LDFLAGS`,

View File

@ -831,7 +831,6 @@ __metadata:
tslib: "npm:^2.8.1"
typanion: "npm:^3.14.0"
typescript: "npm:^5.8.2"
wasm-sjlj: "npm:^1.0.6"
peerDependencies:
"@emnapi/runtime": ^1.1.0
emnapi: ^1.1.0
@ -12717,13 +12716,6 @@ __metadata:
languageName: node
linkType: hard
"wasm-sjlj@npm:^1.0.6":
version: 1.0.6
resolution: "wasm-sjlj@npm:1.0.6"
checksum: 10c0/e1172736ca02af383e838ce396b6cc7fc8814d7cc313b30b721c513a79140313cebadb094b9e76d13e27cc679cde72df4e660dbdc5033e8cf66cf0bd176024dd
languageName: node
linkType: hard
"wcwidth@npm:^1.0.0, wcwidth@npm:^1.0.1":
version: 1.0.1
resolution: "wcwidth@npm:1.0.1"