-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 8 pull requests #133697
Closed
Closed
Rollup of 8 pull requests #133697
Conversation
This file contains 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
Using `cc_args` panics when using `-Clinker-flavor=ld`, because the arguments are in a form tailored for `-Clinker-flavor=gcc`. So instead, we use `link_args` and let that wrap the arguments with the appropriate `-Wl` or `-Xlinker` when needed.
first steps of codegen for `#[naked]` functions using `global_asm!` configure external linkage if no linkage is explicitly set create a `FunctionCx` and properly evaluate consts inline attribute is no longer relevant for naked functions the naked attribute no longer needs to be set by llvm/... we're generating global asm now, so this attribute is meaningless for the codegen backend
correctly emit `.hidden` this test was added in rust-lang#105193 but actually NO_COVERAGE is no longer a thing in the compiler. Sadly, the link to the issue is broken, so I don't know what the problem was originally, but I don't think this is relevant any more with the global asm approach rename test file because it now specifically checks for directives only used by non-macos, non-windows x86_64 add codegen tests for 4 interesting platforms add codegen test for the `#[instruction_set]` attribute add test for `#[link_section]` use `tcx.codegen_fn_attrs` to get attribute info Fix rust-lang#124375 inline const monomorphization/evaluation getting rid of FunctionCx mark naked functions as `InstantiatedMode::GloballyShared` this makes sure that the function prototype is defined correctly, and we don't see LLVM complaining about a global value with invalid linkage monomorphize type given to `SymFn` remove hack that always emits `.globl` monomorphize type given to `Const` remove `linkage_directive` make naked functions always have external linkage mark naked functions as `#[inline(never)]` add test file for functional generics/const/impl/trait usage of naked functions
Something about the MIR lowering for `||` ended up breaking this, but it's fixed by changing the code to use `|` instead. I also added an assembly test to ensure it *keeps* being `adc`.
… it earlier, then some other logic causes invalid visibility for the item (exporting when it shouldn't).
- codegen tests: change `windows` to `win` - cleanup - fix review comments - better way of checking for thumb - get the mangled name from the codegen backend - propagate function alignment - fix gcc backend - fix asan test - check that assembler mode restored
…the rustdoc book
…kage" This reverts commit 9142cae.
This reverts commit 1990f15.
codegen `#[naked]` functions using global asm tracking issue: rust-lang#90957 Fixes rust-lang#124375 This implements the approach suggested in the tracking issue: use the existing global assembly infrastructure to emit the body of `#[naked]` functions. The main advantage is that we now have full control over what gets generated, and are no longer dependent on LLVM not sneakily messing with our output (inlining, adding extra instructions, etc). I discussed this approach with `@Amanieu` and while I think the general direction is correct, there is probably a bunch of stuff that needs to change or move around here. I'll leave some inline comments on things that I'm not sure about. Combined with rust-lang#127853, if both accepted, I think that resolves all steps from the tracking issue. r? `@Amanieu`
…as, r=petrochenkov Properly pass linker arguments that contain commas When linking with the system C compiler, we sometimes want to forward certain arguments unchanged to the linker. This can be done with `-Wl,arg1,arg2` or `-Xlinker arg1 -Xlinker arg2`. `-Wl` is used when possible, since it is more compact, but it does not support commas in the argument itself - in those cases, we need to use `-Xlinker`, and that is what this PR implements. This also fixes using sanitizers on macOS with `-Clinker-flavor=ld`, as those were previously manually using `-Wl`/`-Xlinker` (probably since the support wasn't present in the `link_args` function). Note that there has been [a previous PR for this](rust-lang#38798), but it only implemented this in certain cases when passing `-rpath`. r? compiler
…-preds, r=fee1-dead,lcnr Make `adjust_fulfillment_errors` work with `HostEffectPredicate` and `const_conditions` Greatly improves the spans for reporting unsatisfied `~const` bounds :) r? project-const-traits or maybe `@lcnr` (if you want to deal with a diagnostics PR lmao)
…ebank Only error raw lifetime followed by `\'` in edition 2021+ Fixes rust-lang#133479 cc rust-lang#132341 I think this fixes a purely theoretical regression since it only affects edition 2015 (who is using that?) and only in the very rare case of a raw lifetime followed immediately by a lifetime like `'r#a'r`.
…amples, r=notriddle Do not emit `missing_doc_code_examples` rustdoc lint on module and a few other items It doesn't make sense to expect modules to have code examples. Same goes for: * Trait aliases * Foreign items * Associated types and constants Should make the use of this lint a bit nicer. r? `@notriddle`
…lnay Move some functions out of const_swap feature gate - `swap_unchecked` is still unstable as a regular fn, so that feature gate can also cover its constness. - `swap_nonoverlapping` isn't ready to be stabilized yet, so make it a different feature gate. Part of rust-lang#83163, rust-lang#88539, rust-lang#133668
…nieu Fix chaining `carrying_add`s Something about the MIR lowering for `||` ended up breaking this, but it's fixed by changing the code to use `|` instead. I also added an assembly test to ensure it *keeps* being [`adc`](https://www.felixcloutier.com/x86/adc). cc rust-lang#85532 (comment), which noticed this.
Check let source before suggesting annotation Make sure we don't annotate nonsense type annotations on locals that come from desugarings. fixes rust-lang#133688
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.
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
Dec 1, 2024
@bors r+ rollup=never p=8 |
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 1, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 1, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128004 (codegen `#[naked]` functions using global asm) - rust-lang#132974 (Properly pass linker arguments that contain commas) - rust-lang#133403 (Make `adjust_fulfillment_errors` work with `HostEffectPredicate` and `const_conditions`) - rust-lang#133482 (Only error raw lifetime followed by `\'` in edition 2021+) - rust-lang#133595 (Do not emit `missing_doc_code_examples` rustdoc lint on module and a few other items) - rust-lang#133669 (Move some functions out of const_swap feature gate) - rust-lang#133674 (Fix chaining `carrying_add`s) - rust-lang#133691 (Check let source before suggesting annotation) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
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
Dec 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
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.
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.
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.
Successful merges:
#[naked]
functions using global asm #128004 (codegen#[naked]
functions using global asm)adjust_fulfillment_errors
work withHostEffectPredicate
andconst_conditions
#133403 (Makeadjust_fulfillment_errors
work withHostEffectPredicate
andconst_conditions
)\'
in edition 2021+ #133482 (Only error raw lifetime followed by\'
in edition 2021+)missing_doc_code_examples
rustdoc lint on module and a few other items #133595 (Do not emitmissing_doc_code_examples
rustdoc lint on module and a few other items)carrying_add
s #133674 (Fix chainingcarrying_add
s)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup