Skip to content

Enhancement of WASI_SDK_PREFIX in toolchain files#349

Merged
sbc100 merged 1 commit intoWebAssembly:mainfrom
lum1n0us:opt_wasi_sdk_prefix
Sep 12, 2023
Merged

Enhancement of WASI_SDK_PREFIX in toolchain files#349
sbc100 merged 1 commit intoWebAssembly:mainfrom
lum1n0us:opt_wasi_sdk_prefix

Conversation

@lum1n0us
Copy link
Copy Markdown
Contributor

No need to pass WASI_SDK_PREFIX value from the command line. Use CMAKE_CURRENT_LIST_DIR to assemble the value of WASI_SDK_PREFIX now.

@lum1n0us
Copy link
Copy Markdown
Contributor Author

#346

Comment thread wasi-sdk-pthread.cmake Outdated

# When building from source, WASI_SDK_PREFIX represents the generated directory
if(NOT WASI_SDK_PREFIX)
set(WASI_SDK_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../../)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use a tab for indentation like we already do above?

Comment thread README.md Outdated
Use a toolchain file to setup the *wasi-sdk* platform.

```
$ cmake -DCMAKE_TOOLCHAIN_FILE=${wasi_sdk_home}/share/cmake/wasi-sdk.cmake -S . -B build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just cmake -DCMAKE_TOOLCHAIN_FILE=${wasi_sdk_home}/share/cmake/wasi-sdk.cmake ... .. All those other arguments are very project-specific.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can you use WASI_SDK_PATH rather than wasi_sdk_home for consistency with the existing example code above?

No need to pass `WASI_SDK_PREFIX` value from the command line. Use
`CMAKE_CURRENT_LIST_DIR` to assemble the value of `WASI_SDK_PREFIX`
now.
@sbc100 sbc100 enabled auto-merge (squash) September 12, 2023 14:48
@sbc100 sbc100 merged commit 9b9708e into WebAssembly:main Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants