Skip to content

Commit 5524f0a

Browse files
committed
fix: update WASI toolchain file for wasip1 threads support
1 parent d93e774 commit 5524f0a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

script/release.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,16 @@ async function main () {
130130
}
131131

132132
if (WASI_THREADS_CMAKE_TOOLCHAIN_FILE) {
133+
const wasip1ThreadsToolchainFile = path.join(__dirname, 'wasip1-threads.cmake')
134+
fs.writeFileSync(
135+
wasip1ThreadsToolchainFile,
136+
fs.readFileSync(WASI_THREADS_CMAKE_TOOLCHAIN_FILE, 'utf8').replace(/wasm32-wasi-threads/g, 'wasm32-wasip1-threads'),
137+
'utf8'
138+
)
139+
133140
await spawn('cmake', [
134141
...generatorOptions,
135-
`-DCMAKE_TOOLCHAIN_FILE=${WASI_THREADS_CMAKE_TOOLCHAIN_FILE}`,
142+
`-DCMAKE_TOOLCHAIN_FILE=${wasip1ThreadsToolchainFile.replace(/\\/g, '/')}`,
136143
`-DWASI_SDK_PREFIX=${WASI_SDK_PATH}`,
137144
'-DCMAKE_BUILD_TYPE=Release',
138145
'-DCMAKE_VERBOSE_MAKEFILE=1',

0 commit comments

Comments
 (0)