Skip to content

Commit ed33b1c

Browse files
committed
Clarify when various macros come into play
1 parent 893f248 commit ed33b1c

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

‎Platforms/WASI/README.md‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,16 @@ posix.uname_result(
279279

280280
### C code
281281

282-
WASI SDK defines several built-in macros. You can dump a full list of built-ins
283-
with ``/path/to/wasi-sdk/bin/clang -dM -E - < /dev/null``.
282+
The following built-in macros identify WebAssembly targets and environments.
283+
For WASI SDK, you can dump a full list of built-ins with
284+
`/path/to/wasi-sdk/bin/clang -dM -E - < /dev/null`.
284285

285-
* WebAssembly ``__wasm__`` (also ``__wasm``)
286-
* wasm32 ``__wasm32__`` (also ``__wasm32``)
287-
* wasm64 ``__wasm64__``
288-
* WASI ``__wasi__``
286+
#### Shared with Emscripten
287+
288+
- WebAssembly target: `__wasm__` (also `__wasm`)
289+
- wasm32 target: `__wasm32__` (also `__wasm32`)
290+
- wasm64 target: `__wasm64__`
291+
292+
#### Unique to WASI
293+
294+
- WASI environment: `__wasi__`

0 commit comments

Comments
 (0)