Start renaming preview1 to p1 and preview2 to p2#478
Start renaming preview1 to p1 and preview2 to p2#478sunfishcode merged 5 commits intoWebAssembly:mainfrom
Conversation
This is an initial start at renaming the "preview" terminology in WASI targets to "pX". For example the `wasm32-wasi` target should transition to `wasm32-wasip1`, `wasm32-wasi-preview2` should transition to `wasm32-wasip2`, and `wasm32-wasi-threads` should transition to `wasm32-wasip1-threads`. This commit applies a few renames in the `Makefile` such as: * `WASI_SNAPSHOT` is now either "p1" or "p2" * The default p2 target triple is now `wasm32-wasip2` instead of `wasm32-wasi-preview2` (in the hopes that it's early enough to change the default). * Bindings for WASIp2 were renamed from "preview2" terminology to "wasip2". * The expected-defines files are renamed and the logic of which expectation was used has been updated slightly. With this commit the intention is that non-preview2 defaults do not change. For example the default build still produces a `wasm32-wasi` sysroot. If `TARGET_TRIPLE=wasm32-wasip1` is passed, however, then that sysroot is produced instead. Similarly a `THREAD_MODEL=posix` build produces a `wasm32-wasi-threads` sysroot target but you can now also pass `TARGET_TRIPLE=wasm32-wasip1-threads` to rename the sysroot. My hope is to integrate this into the wasi-sdk repository and build a dual sysroot for these new targets for a release or two so both are supported and then in the future the defaults can be switched away from `wasm32-wasi` to `wasm32-wasip1` as built-by-default.
This commit is a reflection of WebAssembly/wasi-libc#478 into this repository where a few changes are happening: * A new `wasm32-wasip1` sysroot is prepared matching `wasm32-wasi` * A new `wasm32-wasip1-threads` sysroot is prepared matching `wasm32-wasi-threads` * The `wasm32-wasi-preview2` target is renamed `wasm32-wasip2` I've done a bit of makefile refactoring to deduplicate things a bit now that there's a number of targets being built. The long-term goal would be to remove the `wasm32-wasi` and `wasm32-wasip1-threads` targets, but that's not proposed just yet at this time.
| make -j4 | ||
| WASI_SNAPSHOT=preview2 make -j4 | ||
| make -j4 TARGET_TRIPLE=wasm32-wasip1 | ||
| WASI_SNAPSHOT=p2 make -j4 |
There was a problem hiding this comment.
Could you add a comment for each of these make invocations describing what it's building? It's subtle that the first two differ between "wasm32-wasi" and "wasm32-wasip1".
There was a problem hiding this comment.
Sure yeah, in lieu of comments I went ahead and added TARGET_TRIPLE for all of the invocations so it's more clear at-a-glance which each one is doing
This commit is a reflection of WebAssembly/wasi-libc#478 into this repository where a few changes are happening: * A new `wasm32-wasip1` sysroot is prepared matching `wasm32-wasi` * A new `wasm32-wasip1-threads` sysroot is prepared matching `wasm32-wasi-threads` * The `wasm32-wasi-preview2` target is renamed `wasm32-wasip2` I've done a bit of makefile refactoring to deduplicate things a bit now that there's a number of targets being built. The long-term goal would be to remove the `wasm32-wasi` and `wasm32-wasip1-threads` targets, but that's not proposed just yet at this time.
* Start renaming preview1 to p1 and preview2 to p2 This commit is a reflection of WebAssembly/wasi-libc#478 into this repository where a few changes are happening: * A new `wasm32-wasip1` sysroot is prepared matching `wasm32-wasi` * A new `wasm32-wasip1-threads` sysroot is prepared matching `wasm32-wasi-threads` * The `wasm32-wasi-preview2` target is renamed `wasm32-wasip2` I've done a bit of makefile refactoring to deduplicate things a bit now that there's a number of targets being built. The long-term goal would be to remove the `wasm32-wasi` and `wasm32-wasip1-threads` targets, but that's not proposed just yet at this time. * Use $(CLANG_VERSION) instead of hardcoding
the name "p1" "p2" sound rather cryptic to me. also, do you have any non-aesthetic reasons to rename preview1? it's a bit concerning that this kind of change lands almost immediately. |
|
The "p2" naming was discussed at the WASI-02-20 meeting. |
thank you. i will take a look. |
…system WASI community is going to be introducing pN suffix to the target triples to distinguish the different versions of the WASI Preview versions (e.g. `wasm32-unknown-wasip1` for WASI Preview1) to prepare the upcoming WASI Preview2 and so on. Other projects are also following this change: * WebAssembly/wasi-libc#478 * rust-lang/compiler-team#607
…system WASI community is going to be introducing pN suffix to the target triples to distinguish the different versions of the WASI Preview versions (e.g. `wasm32-unknown-wasip1` for WASI Preview1) to prepare the upcoming WASI Preview2 and so on. Other projects are also following this change: * WebAssembly/wasi-libc#478 * rust-lang/compiler-team#607
The WASI community is transitioning to a new naming for the "preview" version in the target triple: wasm32-wasi -> wasm32-wasip1. At this moment, we keep the old triple wasm32-wasi because it's already widely used, but we should start using the new triple threaded target. LLVM checks only if the OS field *starts* with "wasi", so "wasip1" is still considered a valid `isOSWASI()` target. See: WebAssembly/wasi-libc#478
This is an initial start at renaming the "preview" terminology in WASI targets to "pX". For example the
wasm32-wasitarget should transition towasm32-wasip1,wasm32-wasi-preview2should transition towasm32-wasip2, andwasm32-wasi-threadsshould transition towasm32-wasip1-threads. This commit applies a few renames in theMakefilesuch as:WASI_SNAPSHOTis now either "p1" or "p2"wasm32-wasip2instead ofwasm32-wasi-preview2(in the hopes that it's early enough to change the default).With this commit the intention is that non-preview2 defaults do not change. For example the default build still produces a
wasm32-wasisysroot. IfTARGET_TRIPLE=wasm32-wasip1is passed, however, then that sysroot is produced instead. Similarly aTHREAD_MODEL=posixbuild produces awasm32-wasi-threadssysroot target but you can now also passTARGET_TRIPLE=wasm32-wasip1-threadsto rename the sysroot.My hope is to integrate this into the wasi-sdk repository and build a dual sysroot for these new targets for a release or two so both are supported and then in the future the defaults can be switched away from
wasm32-wasitowasm32-wasip1as built-by-default.