Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About WASI_SDK_PREFIX in .cmake #346

Closed
lum1n0us opened this issue Sep 4, 2023 · 1 comment
Closed

About WASI_SDK_PREFIX in .cmake #346

lum1n0us opened this issue Sep 4, 2023 · 1 comment

Comments

@lum1n0us
Copy link
Contributor

lum1n0us commented Sep 4, 2023

Currently, the command of using wasi-sdk.cmake as a toolchain file likes:

$ cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=/opt/wasi-sdk-20.0/share/cmake/wasi-sdk.cmake -DWASI_SDK_PREFIX=/opt/wasi-sdk-20.0

Because of

set(CMAKE_C_COMPILER ${WASI_SDK_PREFIX}/bin/clang${WASI_HOST_EXE_SUFFIX})
, it requires to assign two variables in the command line.

My suggestion is shall we either use ${CMAKE_CURRENT_LIST_DIR}/../.. to replace ${WASI_SDK_PREFIX} or use CMAKE_CURRENT_LIST_DIR to assemble WASI_SDK_PREFIX and make the command shorter?

@sbc100
Copy link
Member

sbc100 commented Sep 6, 2023

Sounds like a good idea! Feel free to send a PR to that effect.

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

No branches or pull requests

2 participants