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 #123838

Merged
merged 17 commits into from
Apr 12, 2024
Merged

Rollup of 7 pull requests #123838

merged 17 commits into from
Apr 12, 2024

Commits on Apr 11, 2024

  1. Set the host library path in run-make v2

    When the build is configured with `[rust] rpath = false`, we need to set
    `LD_LIBRARY_PATH` (or equivalent) to what would have been the `RPATH`,
    so the compiler can find its own libraries. The old `tools.mk` code has
    this environment prefixed in the `$(BARE_RUSTC)` variable, so we just
    need to wire up something similar for run-make v2.
    
    This is now set while building each `rmake.rs` itself, as well as in the
    `rust-make-support` helpers for `rustc` and `rustdoc` commands. This is
    also available in a `set_host_rpath` function for manual commands, like
    in the `compiler-builtins` test.
    cuviper committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    8a5409b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89502e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3596098 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d0ae768 View commit details
    Browse the repository at this point in the history
  5. move QueryKeyStringCache from rustc_middle to rustc_query_impl, where…

    … it actually used
    
    also allows to drop measureme dep on rustc_middle
    klensy committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    124837d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f9ca213 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1170d73 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4ded0b8 View commit details
    Browse the repository at this point in the history
  9. Fix revisions syntax

    saethlin committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    5dcd242 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7e171c7 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. Rollup merge of rust-lang#123599 - matthiaskrgr:rm, r=cjgillot

    remove some things that do not need to be
    matthiaskrgr committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    6f78bf2 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#123763 - cuviper:host-rpath-run-make-v2, r=…

    …jieyouxu
    
    Set the host library path in run-make v2
    
    When the build is configured with `[rust] rpath = false`, we need to set
    `LD_LIBRARY_PATH` (or equivalent) to what would have been the `RPATH`,
    so the compiler can find its own libraries. The old `tools.mk` code has
    this environment prefixed in the `$(BARE_RUSTC)` variable, so we just
    need to wire up something similar for run-make v2.
    
    This is now set while building each `rmake.rs` itself, as well as in the
    `rust-make-support` helpers for `rustc` and `rustdoc` commands. This is
    also available in a `set_host_rpath` function for manual commands, like
    in the `compiler-builtins` test.
    matthiaskrgr committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    a510cbd View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#123775 - scottmcm:place-val, r=cjgillot

    Make `PlaceRef` and `OperandValue::Ref` share a common `PlaceValue` type
    
    Both `PlaceRef` and `OperandValue::Ref` need the triple of the backend pointer immediate, the optional backend metadata for DSTs, and the actual alignment of the place (since it can differ from the ABI alignment).
    
    This PR introduces a new `PlaceValue` type for those three values, leaving [`PlaceRef`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/mir/place/struct.PlaceRef.html) with the `TyAndLayout` and a `PlaceValue`, just like how [`OperandRef`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/mir/operand/struct.OperandRef.html) is a `TyAndLayout` and an `OperandValue`.
    
    This means that various places that use `Ref`s as places can just pass the `PlaceValue` along, like in the below excerpt from the diff:
    ```diff
            match operand.val {
    -            OperandValue::Ref(ptr, meta, align) => {
    -                debug_assert_eq!(meta, None);
    +            OperandValue::Ref(source_place_val) => {
    +                debug_assert_eq!(source_place_val.llextra, None);
                    debug_assert!(matches!(operand_kind, OperandValueKind::Ref));
    -                let fake_place = PlaceRef::new_sized_aligned(ptr, cast, align);
    +                let fake_place = PlaceRef { val: source_place_val, layout: cast };
                    Some(bx.load_operand(fake_place).val)
                }
    ```
    
    There's more refactoring that I'd like to do after this, but I wanted to stop the PR here where it's hopefully easy (albeit probably not quick) to review since I tried to keep every change line-by-line clear.  (Most are just adding `.val` to get to a field.)
    
    You can also go commit-at-a-time if you'd like.  Each passed tidy and the codegen tests on my machine (though I didn't run the cg_gcc ones).
    matthiaskrgr committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    f4f6441 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#123789 - klensy:rq, r=cjgillot

    move QueryKeyStringCache from rustc_middle to rustc_query_impl, where it actually used
    
    Also allows to drop measureme dep on rustc_middle.
    matthiaskrgr committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    41a294d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#123826 - kornelski:one-in-a-quintillion, r=…

    …Amanieu
    
    Move rare overflow error to a cold function
    
    `scoped.spawn()` generates unnecessary inlined panic-formatting code for a branch that will never be taken.
    matthiaskrgr committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    3758e2f View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#123827 - petrochenkov:searchdirs, r=Nadrieril

    linker: Avoid some allocations in search directory iteration
    
    This is more a cleanup than actual optimization.
    matthiaskrgr committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    7f11183 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#123829 - saethlin:fix-revisions, r=jieyouxu

    Fix revisions syntax in cfg(ub_checks) test
    
    `//@ revisions YES NO` doesn't do anything without the `:`.  Thanks for pointing this out to me.
    
    r? jieyouxu
    matthiaskrgr committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    2679ea0 View commit details
    Browse the repository at this point in the history