-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[wasm] Split wasi-sysroot for wasi and wasip1-threads #73077
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
kateinoigakukun
merged 1 commit into
swiftlang:main
from
kateinoigakukun:yt/split-wasi-sysroot-for-targets
Apr 17, 2024
Merged
[wasm] Split wasi-sysroot for wasi and wasip1-threads #73077
kateinoigakukun
merged 1 commit into
swiftlang:main
from
kateinoigakukun:yt/split-wasi-sysroot-for-targets
Apr 17, 2024
Conversation
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
@swift-ci test WebAssembly |
kateinoigakukun
added a commit
to swiftwasm/swiftwasm-build
that referenced
this pull request
Apr 17, 2024
`compiler-rt/lib/builtins/atomic.c` has to be built with atomics feature enabled for wasip1-threads target. We had been sharing the same libclang_rt.builtins.a for both wasi and wasip1-threads targets, but enabling atomics feature breaks non-threaded wasi target due to unnecessary feature dependencies. swiftlang/swift#73077 will build libclang_rt.builtins.a separately and install wasi-sysroot under different directories for each target.
@swift-ci smoke test |
libclang_rt.builtins library is placed in the clang resource directory per OS and architecture, so "environment" field is not used to find the library (except for android). wasi and wasip1-threads require different target features, so we need to split wasi-sysroot for them. Before ``` wasi-sysroot ├── include ├── lib │ ├── wasi │ │ └── libclang_rt.builtins-wasm32.a │ ├── wasm32-wasi │ │ ├── ... │ │ └── libc.a │ ├── wasip1 │ │ └── libclang_rt.builtins-wasm32.a │ └── wasm32-wasip1-threads │ ├── ... │ └── libc.a └── share ``` After ``` wasi-sysroot ├── wasm32-wasi │ ├── include │ ├── lib │ │ ├── wasi ---------- (will be renamed to wasip1) │ │ │ └── libclang_rt.builtins-wasm32.a │ │ └── wasm32-wasi --- (will be renamed to wasm32-wasip1) │ │ ├── ... │ │ └── libc.a │ └── share └── wasm32-wasip1-threads ├── include ├── lib │ ├── wasip1 │ │ └── libclang_rt.builtins-wasm32.a │ └── wasm32-wasip1-threads │ ├── ... │ └── libc.a └── share ```
4c9cbdb
to
1136d50
Compare
@swift-ci smoke test |
kateinoigakukun
added a commit
to swiftwasm/swiftwasm-build
that referenced
this pull request
Apr 18, 2024
`compiler-rt/lib/builtins/atomic.c` has to be built with atomics feature enabled for wasip1-threads target. We had been sharing the same libclang_rt.builtins.a for both wasi and wasip1-threads targets, but enabling atomics feature breaks non-threaded wasi target due to unnecessary feature dependencies. swiftlang/swift#73077 will build libclang_rt.builtins.a separately and install wasi-sysroot under different directories for each target.
kateinoigakukun
added a commit
to swiftwasm/swiftwasm-build
that referenced
this pull request
Apr 23, 2024
`compiler-rt/lib/builtins/atomic.c` has to be built with atomics feature enabled for wasip1-threads target. We had been sharing the same libclang_rt.builtins.a for both wasi and wasip1-threads targets, but enabling atomics feature breaks non-threaded wasi target due to unnecessary feature dependencies. swiftlang/swift#73077 will build libclang_rt.builtins.a separately and install wasi-sysroot under different directories for each target.
kateinoigakukun
added a commit
to swiftwasm/swiftwasm-build
that referenced
this pull request
Apr 25, 2024
`compiler-rt/lib/builtins/atomic.c` has to be built with atomics feature enabled for wasip1-threads target. We had been sharing the same libclang_rt.builtins.a for both wasi and wasip1-threads targets, but enabling atomics feature breaks non-threaded wasi target due to unnecessary feature dependencies. swiftlang/swift#73077 will build libclang_rt.builtins.a separately and install wasi-sysroot under different directories for each target.
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
libclang_rt.builtins library is placed in the clang resource directory per OS and architecture, so "environment" field is not used to find the library (except for android). wasi and wasip1-threads require different target features, so we need to split wasi-sysroot for them.
Before
After