Enhancement of WASI_SDK_PREFIX in toolchain files#349
Merged
sbc100 merged 1 commit intoWebAssembly:mainfrom Sep 12, 2023
Merged
Enhancement of WASI_SDK_PREFIX in toolchain files#349sbc100 merged 1 commit intoWebAssembly:mainfrom
sbc100 merged 1 commit intoWebAssembly:mainfrom
Conversation
Contributor
Author
loganek
approved these changes
Sep 11, 2023
sbc100
approved these changes
Sep 11, 2023
|
|
||
| # When building from source, WASI_SDK_PREFIX represents the generated directory | ||
| if(NOT WASI_SDK_PREFIX) | ||
| set(WASI_SDK_PREFIX ${CMAKE_CURRENT_LIST_DIR}/../../) |
Member
There was a problem hiding this comment.
Maybe use a tab for indentation like we already do above?
sbc100
reviewed
Sep 11, 2023
| 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 |
Member
There was a problem hiding this comment.
How about just cmake -DCMAKE_TOOLCHAIN_FILE=${wasi_sdk_home}/share/cmake/wasi-sdk.cmake ... .. All those other arguments are very project-specific.
Member
There was a problem hiding this comment.
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.
f0a8f70 to
589aece
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No need to pass
WASI_SDK_PREFIXvalue from the command line. UseCMAKE_CURRENT_LIST_DIRto assemble the value ofWASI_SDK_PREFIXnow.