-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Sync rustc_codegen_gcc #95338
Sync rustc_codegen_gcc #95338
Conversation
Now that deferred inlining has been disabled in LLVM, this shouldn't cause catastrophic size blowup.
Mark drop calls in landing pads `cold` instead of `noinline` Now that deferred inlining has been disabled in LLVM (rust-lang#92110), this shouldn't cause catastrophic size blowup. I confirmed that the test cases from rust-lang#41696 (comment) still compile quickly (<1s) after this change. ~Although note that I wasn't able to reproduce the original issue using a recent rustc/llvm with deferred inlining enabled, so those tests may no longer be representative. I was also unable to create a modified test case that reproduced the original issue.~ (edit: I reproduced it on CI by accident--the first commit timed out on the LLVM 12 builder, because I forgot to make it conditional on LLVM version) r? `@nagisa` cc `@arielb1` (this effectively reverts rust-lang#42771 "mark calls in the unwind path as !noinline") cc `@RalfJung` (fixes rust-lang#46515) edit: also fixes rust-lang#87055
Sync from rust 028c6f1
Replace `-Z symbol-mangling-version=v0` with `-C symbol-mangling-version=v0`. Replace `-Z symbol-mangling-version=legacy` with `-Z unstable-options -C symbol-mangling-version=legacy`.
The field is also renamed from `ident` to `name. In most cases, we don't actually need the `Span`. A new `ident` method is added to `VariantDef` and `FieldDef`, which constructs the full `Ident` using `tcx.def_ident_span()`. This method is used in the cases where we actually need an `Ident`. This makes incremental compilation properly track changes to the `Span`, without all of the invalidations caused by storing a `Span` directly via an `Ident`.
This saves a couple of Symbol::intern calls
…arf and msvc instructions
Given that these instructions are diverging, not every codegen backend may be able to produce a return value for them.
Some codegen backends may require all handlers to be immediately known
Previously foreign statics would actually cause a local static to be defined and exported. This issue was found because std::env::vars() was found to return no env vars despite many being defined. This was caused by libstd importing environ as foreign static. The accidental definition of environ caused libstd to read a null pointer which was interpreted as there being no environment variables at all. Also fix tests. STDOUT is not defined by libc. The correct name is stdout. This previously worked as STDOUT was incorrectly defined as null pointer during codegen.
This allows cargo check to function correctly without having to first run prepare_build.sh. cg_clif has been using rust-toolchain too for a while now.
Correctly import foreign statics
* Renable failing test * Update to newest gccjit.rs
This puts every function and data object in their own section. This allows the linker to omit unused functions and data objects with --gc-sections. On linux this shrinks a hello world binary without optimizations (neither sysroot nor binary) from 17MB to 13MB. It shrinks a hello world binary with only sysroot optimizations from 14MB to 13MB. For comparison cg_llvm produces a 3.5MB debug mode hello world binary with an optimized sysroot. Cg_clif produces a 10MB debug mode hello world binary without an optimized sysroot.
Support -Zfunction-sections
…ng#103) * Use sized integer types * Add support for integer types not supported on some platforms * Add feature to test non-native integers in CI
Implement simd_neg
⌛ Testing commit bbff48e with merge f4f4793746b4431cd103189a69d0be49d72f83fc... |
💔 Test failed - checks-actions |
cc @rust-lang/crates-io I think crates.io is having some issues with giving spurious 403 errors. |
@bors retry |
@bors treeclosed-- |
@bors retry |
@bors treeclosed- |
…toyo Sync rustc_codegen_gcc r? `@ghost` `@rustbot` label +A-codegen +A-gcc +T-compiler cc `@antoyo`
…toyo Sync rustc_codegen_gcc r? ``@ghost`` ``@rustbot`` label +A-codegen +A-gcc +T-compiler cc ``@antoyo``
☀️ Test successful - checks-actions |
Finished benchmarking commit (06c3c62): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
r? @ghost
@rustbot label +A-codegen +A-gcc +T-compiler
cc @antoyo