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

Rollup of 7 pull requests #128629

Closed
wants to merge 21 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tshepang and others added 21 commits August 2, 2024 05:16
Only one example is given (for each method)
Many of the code paths it handled were actually impossible. In other
cases, the various checks and transformations were spread around in such
a way that it was hard to tell what was going on.
These options also affect `compiler/rustc_llvm` builds. They should be configurable
even when using CI LLVM.

Signed-off-by: onur-ozkan <[email protected]>
…exported

this maybe should change, but now at least it won't be changed unintentionally
…isibility, r=bjorn3

add test for symbol visibility of `#[naked]` functions

tracking issue: rust-lang#90957

This test is extracted from rust-lang#128004

That PR attempts to generated naked functions as an extern function declaration, combined with a global asm block that provides the implementation for that declaration.

In order to link declaration and definition together, some flavor of external linking must be used: LLVM will error for other linkage types. Specifically the allowed options are `#[linkage = "external"]` and `#[linkage = "extern_weak"]`. That is kind of an implementation detail though: to the user, a naked function should just behave like a normal function.

Hence it should be visible to the linker under the same circumstances as a normal, vanilla function and have the same attributes (Weak, External). Getting this behavior right will require some care, so I think it's a good idea to lock it in now, before making any changes, to make sure we don't regress.

Are there any interesting cases that I missed here? E.g. is checking on different architectures worth it? I don't think the other binary types (rlib etc) are relevant here, but may be missing something.

r? ``@bjorn3``
time.rs: remove "Basic usage text"

Only one example is given (for each method)
…r=saethlin

Miri: add a flag to do recursive validity checking

The point of this flag is to allow gathering experimental data for rust-lang/unsafe-code-guidelines#412.
…riddle

rustdoc: Cleanup `CacheBuilder` code for building search index

This code was very convoluted and hard to reason about. It is now (I hope) much
clearer and more suitable for both future enhancements and future cleanups.

I'm doing this as a precursor, with no UI changes, to changing rustdoc to
[ignore blanket impls][1] in type-based search.

[1]: rust-lang#128471 (comment)

r? `@notriddle`
allow setting `link-shared` and `static-libstdcpp` with CI LLVM

These options also affect `compiler/rustc_llvm` builds. They should be configurable even when using CI LLVM.

r? ``@cuviper``
…=GuillaumeGomez

rustdoc: make the hover trail for doc anchors a bit bigger

https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Weird.20markdown.20heading.20rendering.3F

r? ``@GuillaumeGomez``

### Screenshots (the purple part is the padding, which the mouse can pass through to hover over it)

| Before | After |
|--|--|
| ![image](https://github.com/user-attachments/assets/5070eebe-84ac-4f5d-8950-58664370191c) | ![image](https://github.com/user-attachments/assets/55340161-ad8a-41bd-a120-8cdab11f4af0)
…riddle

Update rinja version to 0.3.0

r? ``@notriddle``
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 4, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Aug 4, 2024

📌 Commit 08f3693 has been approved by matthiaskrgr

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 Aug 4, 2024
@bors
Copy link
Contributor

bors commented Aug 4, 2024

⌛ Testing commit 08f3693 with merge c3d944a...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 4, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#128362 (add test for symbol visibility of `#[naked]` functions)
 - rust-lang#128526 (time.rs: remove "Basic usage text")
 - rust-lang#128531 (Miri: add a flag to do recursive validity checking)
 - rust-lang#128578 (rustdoc: Cleanup `CacheBuilder` code for building search index)
 - rust-lang#128589 (allow setting `link-shared` and `static-libstdcpp` with CI LLVM)
 - rust-lang#128615 (rustdoc: make the hover trail for doc anchors a bit bigger)
 - rust-lang#128620 (Update rinja version to 0.3.0)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests/run-make/naked-symbol-visibility stdout ----

error: rmake recipe failed to complete
status: exit status: 1
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/naked-symbol-visibility/rmake_out" && env -u RUSTFLAGS AR="ar" CC="/Applications/Xcode_14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=11 -isysroot /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk" CXX="/Applications/Xcode_14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=11 -isysroot /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -stdlib=libc++" DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0-bootstrap-tools/aarch64-apple-darwin/release/deps:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0/lib:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2-tools-bin:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib/rustlib/aarch64-apple-darwin/lib" HOST_RPATH_DIR="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib" LD_LIB_PATH_ENVVAR="DYLD_LIBRARY_PATH" LLVM_BIN_DIR="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/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 codegendata codegentypes core coroutines coverage csky cskyasmparser cskycodegen cskydesc cskydisassembler cskyinfo debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo 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 orcdebugging orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi textapibinaryreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/ci-llvm/bin/FileCheck" NODE="/opt/homebrew/bin/node" PYTHON="/usr/bin/python3" RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUSTDOC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustdoc" SOURCE_ROOT="/Users/runner/work/rust/rust" TARGET="aarch64-apple-darwin" TARGET_RPATH_DIR="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib/rustlib/aarch64-apple-darwin/lib" TARGET_RPATH_ENV="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/naked-symbol-visibility/rmake_out:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0-bootstrap-tools/aarch64-apple-darwin/release/deps:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0/lib" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/naked-symbol-visibility/rmake"
--- stderr -------------------------------
command failed at line 8
command failed at line 8
Command { cmd: DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/naked-symbol-visibility/rmake_out:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0-bootstrap-tools/aarch64-apple-darwin/release/deps:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0/lib:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2-tools-bin:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib/rustlib/aarch64-apple-darwin/lib" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/naked-symbol-visibility/rmake_out" "-Zshare-generics=no" "a_rust_dylib.rs", stdin: None, drop_bomb: DropBomb { command: "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc", defused: true, armed_location: Location { file: "/Users/runner/work/rust/rust/tests/run-make/naked-symbol-visibility/rmake.rs", line: 8, col: 5 } } }
output status: `exit status: 1`
=== STDOUT ===


=== STDERR ===
error: invalid operand for instruction
error: invalid operand for instruction
##[error]  --> a_rust_dylib.rs:50:20
   |
50 |     unsafe { asm!("mov rax, 42", "ret", options(noreturn)) }
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:6
1  |     mov rax, 42
   |         ^

error: invalid operand for instruction
error: invalid operand for instruction
##[error]  --> a_rust_dylib.rs:56:20
   |
56 |     unsafe { asm!("mov rax, 42", "ret", options(noreturn)) }
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:6
1  |     mov rax, 42
   |         ^

error: invalid operand for instruction
error: invalid operand for instruction
##[error]  --> a_rust_dylib.rs:61:20
   |
61 |     unsafe { asm!("mov rax, {}", "ret", const T::COUNT, options(noreturn)) }
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:6
1  |     mov rax, 1
   |         ^

error: invalid operand for instruction
error: invalid operand for instruction
##[error]  --> a_rust_dylib.rs:67:20
   |
67 |     unsafe { asm!("mov rax, 42", "ret", options(noreturn)) }
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:6
1  |     mov rax, 42
   |         ^

error: invalid operand for instruction
error: invalid operand for instruction
##[error]  --> a_rust_dylib.rs:73:20
   |
73 |     unsafe { asm!("mov rax, 42", "ret", options(noreturn)) }
   |
note: instantiated into assembly here
note: instantiated into assembly here
  --> <inline asm>:1:6
1  |     mov rax, 42
   |         ^

error: aborting due to 5 previous errors

@bors
Copy link
Contributor

bors commented Aug 4, 2024

💔 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 Aug 4, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-dde55vp branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.