-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 6 pull requests #108159
Rollup of 6 pull requests #108159
Conversation
This is what ISO C strongly implies this is correct, and many processor-specific ABIs imply or mandate this size, so "everyone" (LLVM, gcc...) defaults to emitting enums this way. However, this is by no means guaranteed by ISO C, and the bare-metal Arm targets show it can be overridden, which rustc supports via `c-enum-min-bits` in a target.json. The override is a flag named `-fshort-enums` in clang and gcc, but introducing a CLI flag is probably unnecessary for rustc. This flag can be used by non-Arm microcontroller targets, like AVR and MSP430, but it is not enabled for them by default. Rust programmers who know the size of a target's enums can use explicit reprs, which also lets them match C23 code. This change is most relevant to 16-bit targets: AVR and MSP430. Most of rustc's targets use 32-bit ints, but ILP64 does exist. Regardless, rustc should now correctly handle enums for both very small and very large targets. Thanks to William for confirming MSP430 behavior, and to Waffle for better style and no-core size_of asserts. Co-authored-by: William D. Jones <thor0505@comcast.net> Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
…16-bit-targets, r=WaffleLapkin Default `repr(C)` enums to `c_int` size This is what ISO C strongly implies this is correct, and many processor-specific ABIs imply or mandate this size, so "everyone" (LLVM, gcc...) defaults to emitting enums this way. However, this is by no means guaranteed by ISO C, and the bare-metal Arm targets show it can be overridden, which rustc supports via `c-enum-min-bits` in a target.json. The override is a flag named `-fshort-enums` in clang and gcc, but introducing a CLI flag is probably unnecessary for rustc. This flag can be used by non-Arm microcontroller targets, like AVR and MSP430, but it is not enabled for them by default. Rust programmers who know the size of a target's enums can use explicit reprs, which also lets them match C23 code. This change is most relevant to 16-bit targets: AVR and MSP430. Most of rustc's targets use 32-bit ints, but ILP64 does exist. Regardless, rustc should now correctly handle enums for both very small and very large targets. Thanks to William for confirming MSP430 behavior, and to Waffle for better style and no-core `size_of` asserts. Fixes rust-lang#107361 Fixes rust-lang#77806
Copy `bin/*` and `lib/*.dylib` files to `stage0-sysroot` Fixes rust-lang#101691
fix a line, and do a consistency fix
…Mark-Simulacrum Add compiler-errors to a few more triagebot groups Self-explanatory
…mpiler-errors `BasicBlock::new(0)` -> `START_BLOCK` [no functional changes]
@bors r+ rollup=never p=6 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: f4f5fc3e5c In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (f722b24): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Warning ⚠: The following benchmark(s) failed to build:
cc @rust-lang/wg-compiler-performance Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. |
The bootstrapping perf test failed, which is weird. The last few lines of output with the error:
Strange. Has anything about the paths changed lately? I guess we can keep watching, see if this is a once-only failure or if it continues. |
Hm, the next merge commit also lacks any kind of benchmark... |
Ugh 😅 could we make it say "No relevant results" instead of "No results" if there are results but that checkbox is not ticket? :/ |
Implemented here. |
Successful merges:
repr(C)
enums toc_int
size #107592 (Defaultrepr(C)
enums toc_int
size)bin/*
andlib/*.dylib
files tostage0-sysroot
#107956 (Copybin/*
andlib/*.dylib
files tostage0-sysroot
)BasicBlock::new(0)
->START_BLOCK
[no functional changes] #108154 (BasicBlock::new(0)
->START_BLOCK
[no functional changes])Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup