-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 #125463
Rollup of 6 pull requests #125463
Commits on May 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fde4a22 - Browse repository at this point
Copy the full SHA fde4a22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6867d64 - Browse repository at this point
Copy the full SHA 6867d64View commit details
Commits on May 22, 2024
-
rustc_codegen_llvm: add support for writing summary bitcode
Typical uses of ThinLTO don't have any use for this as a standalone file, but distributed ThinLTO uses this to make the linker phase more efficient. With clang you'd do something like `clang -flto=thin -fthin-link-bitcode=foo.indexing.o -c foo.c` and then get both foo.o (full of bitcode) and foo.indexing.o (just the summary or index part of the bitcode). That's then usable by a two-stage linking process that's more friendly to distributed build systems like bazel, which is why I'm working on this area. I talked some to @teresajohnson about naming in this area, as things seem to be a little confused between various blog posts and build systems. "bitcode index" and "bitcode summary" tend to be a little too ambiguous, and she tends to use "thin link bitcode" and "minimized bitcode" (which matches the descriptions in LLVM). Since the clang option is thin-link-bitcode, I went with that to try and not add a new spelling in the world. Per @dtolnay, you can work around the lack of this by using `lld --thinlto-index-only` to do the indexing on regular .o files of bitcode, but that is a bit wasteful on actions when we already have all the information in rustc and could just write out the matching minimized bitcode. I didn't test that at all in our infrastructure, because by the time I learned that I already had this patch largely written.
Configuration menu - View commit details
-
Copy full SHA for aa91871 - Browse repository at this point
Copy the full SHA aa91871View commit details -
cleanup: remove leftover extra block
This was needed in an older version of this patch, but never got edited out when it became obsolete.
Configuration menu - View commit details
-
Copy full SHA for 03d5556 - Browse repository at this point
Copy the full SHA 03d5556View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c7859e - Browse repository at this point
Copy the full SHA 1c7859eView commit details
Commits on May 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for de64462 - Browse repository at this point
Copy the full SHA de64462View commit details -
Configuration menu - View commit details
-
Copy full SHA for c398b2c - Browse repository at this point
Copy the full SHA c398b2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 324b66c - Browse repository at this point
Copy the full SHA 324b66cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a59589b - Browse repository at this point
Copy the full SHA a59589bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2868985 - Browse repository at this point
Copy the full SHA 2868985View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45ad60d - Browse repository at this point
Copy the full SHA 45ad60dView commit details -
Configuration menu - View commit details
-
Copy full SHA for fab28f2 - Browse repository at this point
Copy the full SHA fab28f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d64a8bd - Browse repository at this point
Copy the full SHA d64a8bdView commit details -
thinlto: only build summary file if needed
If we don't do this, some versions of LLVM (at least 17, experimentally) will double-emit some error messages, which is how I noticed this. Given that it seems to be costing some extra work, let's only request the summary bitcode production if we'll actually bother writing it down, otherwise skip it.
Configuration menu - View commit details
-
Copy full SHA for de8200c - Browse repository at this point
Copy the full SHA de8200cView commit details -
cleanup: standardize on summary over index in names
I did this in the user-facing logic, but I noticed while fixing a minor defect that I had missed it in a few places in the internal details.
Configuration menu - View commit details
-
Copy full SHA for 3ea4941 - Browse repository at this point
Copy the full SHA 3ea4941View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0581b5 - Browse repository at this point
Copy the full SHA a0581b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfe3f77 - Browse repository at this point
Copy the full SHA cfe3f77View commit details -
Rollup merge of rust-lang#125263 - lqd:lld-fallback, r=petrochenkov
rust-lld: fallback to rustc's sysroot if there's no path to the linker in the target sysroot As seen in rust-lang#125246, some sysroots don't expect to contain `rust-lld` and want to keep it that way, so we fallback to the default rustc sysroot if there is no path to the linker in any of the sysroot tools search paths. This is how we locate codegen-backends' dylibs already. People also have requested an error if none of these search paths contain the self-contained linker directory, so there's also an error in that case. r? `@petrochenkov` cc `@ehuss` `@RalfJung` I'm not sure where we check for `rust-lld`'s existence on the targets where we use it by default, and if we just ignore it when missing or emit a warning (as I assume we don't emit an error), so I just checked for the existence of `gcc-ld`, where `cc` will look for the lld-wrapper binaries. <sub>*Feel free to point out better ways to do this, it's the middle of the night here.*</sub> Fixes rust-lang#125246
Configuration menu - View commit details
-
Copy full SHA for d6a1f1d - Browse repository at this point
Copy the full SHA d6a1f1dView commit details -
Rollup merge of rust-lang#125345 - durin42:thin-link-bitcode, r=bjorn3
rustc_codegen_llvm: add support for writing summary bitcode Typical uses of ThinLTO don't have any use for this as a standalone file, but distributed ThinLTO uses this to make the linker phase more efficient. With clang you'd do something like `clang -flto=thin -fthin-link-bitcode=foo.indexing.o -c foo.c` and then get both foo.o (full of bitcode) and foo.indexing.o (just the summary or index part of the bitcode). That's then usable by a two-stage linking process that's more friendly to distributed build systems like bazel, which is why I'm working on this area. I talked some to `@teresajohnson` about naming in this area, as things seem to be a little confused between various blog posts and build systems. "bitcode index" and "bitcode summary" tend to be a little too ambiguous, and she tends to use "thin link bitcode" and "minimized bitcode" (which matches the descriptions in LLVM). Since the clang option is thin-link-bitcode, I went with that to try and not add a new spelling in the world. Per `@dtolnay,` you can work around the lack of this by using `lld --thinlto-index-only` to do the indexing on regular .o files of bitcode, but that is a bit wasteful on actions when we already have all the information in rustc and could just write out the matching minimized bitcode. I didn't test that at all in our infrastructure, because by the time I learned that I already had this patch largely written.
Configuration menu - View commit details
-
Copy full SHA for 4ee97fc - Browse repository at this point
Copy the full SHA 4ee97fcView commit details -
Rollup merge of rust-lang#125362 - joboet:tait_hack, r=Nilstrieb
Actually use TAIT instead of emulating it `core`'s `impl_fn_for_zst` macro is just a hacky way of emulating TAIT. TAIT has become stable enough to be used [in other places](https://github.com/rust-lang/rust/blob/e8fbd991287f637f95016a71ddc13438415bbe59/library/std/src/backtrace.rs#L431) inside the standard library, so let's use it in `core` as well.
Configuration menu - View commit details
-
Copy full SHA for 1e4bde1 - Browse repository at this point
Copy the full SHA 1e4bde1View commit details -
Rollup merge of rust-lang#125412 - Urgau:check-cfg-less-build-rs, r=w…
…esleywiser Don't suggest adding the unexpected cfgs to the build-script it-self This PR adds a check to avoid suggesting to add the unexpected cfgs inside the build-script when building the build-script it-self, as it won't have any effect, since build-scripts applies to their descended target. Fixes rust-lang#125368
Configuration menu - View commit details
-
Copy full SHA for 56427d3 - Browse repository at this point
Copy the full SHA 56427d3View commit details -
Rollup merge of rust-lang#125445 - GuillaumeGomez:rustdoc-migrate-sho…
…rt-out-dir, r=jieyouxu Migrate `run-make/rustdoc-with-short-out-dir-option` to `rmake.rs` Part of rust-lang#121876. r? `@jieyouxu`
Configuration menu - View commit details
-
Copy full SHA for 0de052a - Browse repository at this point
Copy the full SHA 0de052aView commit details -
Rollup merge of rust-lang#125452 - Urgau:check-cfg-libraries-cleanup,…
… r=bjorn3 Cleanup check-cfg handling in core and std Follow-up to rust-lang#125296 where we: - expect any feature cfg in std, due to `#[path]` imports - move some check-cfg args inside the `build.rs` as per Cargo recommendation - and replace the fake Cargo feature `"restricted-std"` by the custom cfg `restricted_std` Fixes rust-lang#125296 (comment) r? `@bjorn3` (maybe, feel free to re-roll)
Configuration menu - View commit details
-
Copy full SHA for a8a71d0 - Browse repository at this point
Copy the full SHA a8a71d0View commit details