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

Rollback part of pr 104137 that broke wasm linker overriding #108996

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Mar 10, 2023

This is a quick fix to address #108910

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2023

r? @WaffleLapkin

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 10, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2023

These commits modify compiler targets.
(See the Target Tier Policy.)

@pnkfelix
Copy link
Member Author

r? @petrochenkov

@rustbot rustbot assigned petrochenkov and unassigned WaffleLapkin Mar 10, 2023
@pnkfelix
Copy link
Member Author

pnkfelix commented Mar 10, 2023

(note: I definitely am not wedded to this particular approach. In the associated zulip thread, I described a number of alternatives that I would be equally happy with. I'm looking to @petrochenkov and to the WASM stakeholders like @bjorn3, @alexcrichton , and @sunfishcode to guide us here.)

@pnkfelix
Copy link
Member Author

(also, I am nearly certain that this unit test is not constructed properly. Or at least, on my host system, I know that the included unit test did not suffice to expose the problem, because of the # only-wasm32-bare directive in the Makefile. I am not yet sure how I will resolve that; I suspect I might need to make some test PR's with just the unit test and figure out what will make the CI trigger a failure.)

@pnkfelix pnkfelix added O-wasm Target: WASM (WebAssembly), http://webassembly.org/ A-linkage Area: linking into static, shared libraries and binaries labels Mar 10, 2023
@alexcrichton
Copy link
Member

I at least personally don't know how the self-containedness support in rustc relates to wasm, or in other words I don't think I know enough about the way the fix is applied here to comment on it. If this issue is only showing up when users switch the wasm linker to clang I also don't know enough about the motivations to do that to know whether this is the best fix.

@petrochenkov
Copy link
Contributor

r=me after fixing CI.
@rustbot author

I think the proper solution here would be fine-grained -Clink-self-contained (#96884), including target defaults for it.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 13, 2023
@pnkfelix
Copy link
Member Author

pnkfelix commented Mar 14, 2023

wow, I ... was so sure I did a local build here... (but the nature of that failure shows that I clearly didn't)

(fixed build by adding missing import.)
@pnkfelix pnkfelix force-pushed the rollback-part-of-pr-104137-that-broke-wasm-linker-overriding branch from ceb41ed to 8bccd4e Compare March 14, 2023 15:45
@rustbot
Copy link
Collaborator

rustbot commented Mar 14, 2023

These commits modify compiler targets.
(See the Target Tier Policy.)

Replicates problem on my machine.

To exercise the test, I had to use a config.toml that has:

```
[build]
target = ["x86_64-unknown-linux-gnu","wasm32-unknown-unknown"]
nodejs = "node"

[rust]
lld = true
```
@pnkfelix pnkfelix force-pushed the rollback-part-of-pr-104137-that-broke-wasm-linker-overriding branch from 8bccd4e to 568b722 Compare March 14, 2023 18:57
@pnkfelix
Copy link
Member Author

@bors r=petrochenkov rollup=iffy

@bors
Copy link
Contributor

bors commented Mar 14, 2023

📌 Commit 568b722 has been approved by petrochenkov

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 14, 2023
@bors
Copy link
Contributor

bors commented Mar 15, 2023

⌛ Testing commit 568b722 with merge c9807ee2ed61b1b8db5c1b69e6293253ecd1e9dc...

@bors
Copy link
Contributor

bors commented Mar 15, 2023

💔 Test failed - checks-actions

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2023
@pnkfelix
Copy link
Member Author

@bors retry

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 16, 2023
@bors
Copy link
Contributor

bors commented Mar 17, 2023

⌛ Testing commit 568b722 with merge c18255d641f1403e74209d0dc837d4a9482028cc...

@bors
Copy link
Contributor

bors commented Mar 17, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 17, 2023
@rust-log-analyzer

This comment has been minimized.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2023
@ehuss
Copy link
Contributor

ehuss commented Mar 28, 2023

@bors r-

(was inadvertently re-queued by a homu sync)

@pnkfelix
Copy link
Member Author

error: make failed
status: exit status: 2
command: cd "/checkout/tests/run-make/wasm-override-linker" && AR="ar" CC="clang -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown" CXX="clang -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown" HOST_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwp engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink libdriver lineeditor linker lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray" LLVM_FILECHECK="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" NODE="/node-v15.14.0-linux-x64/bin/node" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUST_BUILD_STAGE="stage2-wasm32-unknown-unknown" RUST_DEMANGLER="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/rust-demangler" S="/checkout" TARGET="wasm32-unknown-unknown" TARGET_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/wasm32-unknown-unknown/lib" TMPDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/wasm-override-linker/wasm-override-linker" "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/wasm-override-linker/wasm-override-linker:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/wasm-override-linker/wasm-override-linker -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/wasm-override-linker/wasm-override-linker  foo.rs --crate-type cdylib --target wasm32-unknown-unknown -C linker=clang
--- stderr -------------------------------
--- stderr -------------------------------
error: linker `clang` not found
  = note: No such file or directory (os error 2)

error: aborting due to previous error

uhhhh, do we not have access to clang on the CI?

Or is this something where I need to modify a docker image or something to make the CI install clang as part of its setup here?

@pnkfelix pnkfelix added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 29, 2023
@pnkfelix
Copy link
Member Author

I'm going to rip out the regression test (i.e. revise this PR so that it just has the rollback), and then file a separate issue about making a regression test for this

@pnkfelix pnkfelix removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 29, 2023
removing regression test
removing regression test
@pnkfelix
Copy link
Member Author

@bors r=petrochenkov rollup=iffy

@bors
Copy link
Contributor

bors commented Mar 29, 2023

📌 Commit 167623a has been approved by petrochenkov

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 29, 2023
@bors
Copy link
Contributor

bors commented Mar 29, 2023

⌛ Testing commit 167623a with merge 17c1167...

@bors
Copy link
Contributor

bors commented Mar 29, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 17c1167 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 29, 2023
@bors bors merged commit 17c1167 into rust-lang:master Mar 29, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 29, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (17c1167): comparison URL.

Overall result: ✅ improvements - 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries merged-by-bors This PR was explicitly merged by bors. O-wasm Target: WASM (WebAssembly), http://webassembly.org/ S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants