Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Feb 16, 2023
1 parent 7497586 commit e1872e6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion script/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,17 @@ async function main () {
sysroot
], cwd)

let WASI_THREADS_CMAKE_TOOLCHAIN_FILE = ''
if (fs.existsSync(path.join(wasiSdkPath, 'share/cmake/wasi-sdk-pthread.cmake'))) {
WASI_THREADS_CMAKE_TOOLCHAIN_FILE = `${WASI_SDK_PATH}/share/cmake/wasi-sdk-pthread.cmake`
} else if (fs.existsSync(path.join(wasiSdkPath, 'share/cmake/wasi-sdk-threads.cmake'))) {
WASI_THREADS_CMAKE_TOOLCHAIN_FILE = `${WASI_SDK_PATH}/share/cmake/wasi-sdk-threads.cmake`
}

if (WASI_THREADS_CMAKE_TOOLCHAIN_FILE) {
await spawn('cmake', [
...generatorOptions,
`-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_PATH}/share/cmake/wasi-sdk-pthread.cmake`,
`-DCMAKE_TOOLCHAIN_FILE=${WASI_THREADS_CMAKE_TOOLCHAIN_FILE}`,
`-DWASI_SDK_PREFIX=${WASI_SDK_PATH}`,
'-DCMAKE_BUILD_TYPE=Release',
'-DCMAKE_VERBOSE_MAKEFILE=1',
Expand Down

0 comments on commit e1872e6

Please sign in to comment.