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

Update the wasi toolchain. #105395

Merged
merged 1 commit into from
Dec 7, 2022
Merged

Conversation

sunfishcode
Copy link
Member

Update the WASI build to LLVM 15.0 and the wasi-libc version from wasi-sdk-17.

This will require a ci-mirrors.rust-lang.org file load. Specifically, we need this LLVM release tarball uploaded to be downloadable from this URL.

The biggest change in wasi-sdk-17 is that user exports no longer automatically run constructor functions. More details at: WebAssembly/WASI#493.

Update the WASI build to LLVM 15.0 and the wasi-libc version from [wasi-sdk-17].

This will require a ci-mirrors.rust-lang.org file load. Specifically, we
need [this LLVM release tarball] uploaded to be downloadable from
[this URL].

[this LLVM release tarball]: https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz
[this URL]: https://ci-mirrors.rust-lang.org/rustc/2022-12-06-clang%2Bllvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz
[wasi-sdk-17]: https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-17
@rustbot
Copy link
Collaborator

rustbot commented Dec 6, 2022

r? @pietroalbini

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Dec 6, 2022
@pietroalbini
Copy link
Member

Uploaded the file to the mirrors.

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Dec 6, 2022

📌 Commit 3e671fe has been approved by pietroalbini

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 6, 2022
@bors
Copy link
Contributor

bors commented Dec 7, 2022

⌛ Testing commit 3e671fe with merge ec28f53...

@bors
Copy link
Contributor

bors commented Dec 7, 2022

☀️ Test successful - checks-actions
Approved by: pietroalbini
Pushing ec28f53 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 7, 2022
@bors bors merged commit ec28f53 into rust-lang:master Dec 7, 2022
@rustbot rustbot added this to the 1.67.0 milestone Dec 7, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ec28f53): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.9% [0.2%, 1.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.6% [-2.6%, -2.6%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

@Amanieu
Copy link
Member

Amanieu commented Dec 8, 2022

This seems to have broken CI on stdarch: https://github.com/rust-lang/stdarch/actions/runs/3649419047/jobs/6164079793

     Running unittests src/lib.rs (target/wasm32-wasi/release/deps/core_arch-6ba01dce191948b9.wasm)
Error: failed to run main module `/checkout/target/wasm32-wasi/release/deps/core_arch-6ba01dce191948b9.wasm`

Caused by:
    0: failed to instantiate "/checkout/target/wasm32-wasi/release/deps/core_arch-6ba01dce191948b9.wasm"
    1: unknown import: `env::__main_argc_argv` has not been defined

@sunfishcode
Copy link
Member Author

@Amanieu I've now submitted #105468 to address that.

sunfishcode added a commit to sunfishcode/rust that referenced this pull request Dec 8, 2022
On wasm, the age-old C trick of having a main function which can either have
no arguments or argc+argv doesn't work, because wasm requires caller and
callee signatures to match. WASI's current strategy is to have compilers
mangle main's name to indicate which signature they're using. Rust uses the
no-argument form, which should be mangled as `__main_void`.

This is needed on wasm32-wasi as of rust-lang#105395.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 9, 2022
…wasi, r=estebank

Mangle "main" as "__main_void" on wasm32-wasi

On wasm, the age-old C trick of having a main function which can either have no arguments or argc+argv doesn't work, because wasm requires caller and callee signatures to match. WASI's current strategy is to have compilers mangle main's name to indicate which signature they're using. Rust uses the no-argument form, which should be mangled as `__main_void`.

This is needed on wasm32-wasi as of rust-lang#105395.
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this pull request Dec 26, 2022
On wasm, the age-old C trick of having a main function which can either have
no arguments or argc+argv doesn't work, because wasm requires caller and
callee signatures to match. WASI's current strategy is to have compilers
mangle main's name to indicate which signature they're using. Rust uses the
no-argument form, which should be mangled as `__main_void`.

This is needed on wasm32-wasi as of rust-lang#105395.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants