Skip to content

Add __wasi_sdk_{major,version}__ defines#709

Merged
alexcrichton merged 1 commit intoWebAssembly:mainfrom
alexcrichton:wasi-sdk-version-information
Jan 7, 2026
Merged

Add __wasi_sdk_{major,version}__ defines#709
alexcrichton merged 1 commit intoWebAssembly:mainfrom
alexcrichton:wasi-sdk-version-information

Conversation

@alexcrichton
Copy link
Copy Markdown
Collaborator

This commit updates the generated wasi/version.h file with two new #defines:

  • __wasi_sdk_major__ set to 29 for example for wasi-sdk-29.0
  • __wasi_sdk_version__ set to "29.0" for example for wasi-sdk-29.0

This'll get set when building wasi-sdk itself through -DWASI_SDK_VERSION=... as part of the configuration of libc itself.

cc #688

This commit updates the generated `wasi/version.h` file with two new
`#define`s:

* `__wasi_sdk_major__` set to `29` for example for `wasi-sdk-29.0`
* `__wasi_sdk_version__` set to `"29.0"` for example for `wasi-sdk-29.0`

This'll get set when building wasi-sdk itself through
`-DWASI_SDK_VERSION=...` as part of the configuration of libc itself.

cc WebAssembly#688
@alexcrichton alexcrichton merged commit 637bdc9 into WebAssembly:main Jan 7, 2026
25 checks passed
@alexcrichton alexcrichton deleted the wasi-sdk-version-information branch January 7, 2026 22:15
alexcrichton added a commit to alexcrichton/wasi-sdk that referenced this pull request Jan 9, 2026
This updates to include WebAssembly/wasi-libc#709 and then additionally
configures wasi-libc with `-DWASI_SDK_VERSION=...` to ensure that
wasi-sdk builds will now have `__wasi_sdk_major__` defined along with
`__wasi_sdk_version__`.

Closes WebAssembly/wasi-libc#688
alexcrichton added a commit to WebAssembly/wasi-sdk that referenced this pull request Jan 9, 2026
This updates to include WebAssembly/wasi-libc#709 and then additionally
configures wasi-libc with `-DWASI_SDK_VERSION=...` to ensure that
wasi-sdk builds will now have `__wasi_sdk_major__` defined along with
`__wasi_sdk_version__`.

Closes WebAssembly/wasi-libc#688
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.

2 participants