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 9 pull requests #129647

Merged
merged 33 commits into from
Aug 27, 2024
Merged

Rollup of 9 pull requests #129647

merged 33 commits into from
Aug 27, 2024

Commits on Jul 29, 2024

  1. Configuration menu
    Copy the full SHA
    0b87af9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    608901b View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. Configuration menu
    Copy the full SHA
    6899f5a View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. miri weak memory emulation: initialize store buffer only on atomic wr…

    …ites; pre-fill with previous value
    RalfJung committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    8b18c6b View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Configuration menu
    Copy the full SHA
    194baa8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    daedbd4 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. Configuration menu
    Copy the full SHA
    f62b9e0 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Configuration menu
    Copy the full SHA
    681a866 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1ed9ee7 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2024

  1. Enable f16 in assembly on aarch64 platforms that support it

    Signed-off-by: rongfu.leng <[email protected]>
    lengrongfu authored and beetrees committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    ec67cdf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abd44fc View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2024

  1. Configuration menu
    Copy the full SHA
    5b37463 View commit details
    Browse the repository at this point in the history
  2. mark rust-lld-compress-debug-sections test as needing zstd

    also make it fail if there's a compression issue
    lqd committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    79f3c51 View commit details
    Browse the repository at this point in the history
  3. prepare test for expanding scope

    lqd committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    802222f View commit details
    Browse the repository at this point in the history
  4. expand zstd debuginfo compression test

    it now checks zlib and zstd, via rustc and rust-lld
    lqd committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    1935e21 View commit details
    Browse the repository at this point in the history
  5. move and rename zstd script

    move it where it's used, and name it like the other scripts
    lqd committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    62c8c69 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7963bed View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    650ba7f View commit details
    Browse the repository at this point in the history
  8. allow llvm.libzstd with download-ci-llvm = true

    but warn about it
    lqd committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    5d83cb2 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Configuration menu
    Copy the full SHA
    fe29750 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    53d4544 View commit details
    Browse the repository at this point in the history
  3. also update copysign docs

    RalfJung committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    0c7d6c4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ebf46f7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5d0ce4c View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Rollup merge of rust-lang#126985 - Mrmaxmeier:dwarf-embed-source, r=d…

    …avidtwco
    
    Implement `-Z embed-source` (DWARFv5 source code embedding extension)
    
    Implement rust-lang/compiler-team#764 MCP which adds an unstable flag that exposes LLVM's [DWARFv5 source code embedding](https://dwarfstd.org/issues/180201.1.html) support.
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    9c26ebe View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#127922 - spastorino:unsafe-extern-blocks-in…

    …-style-guide, r=compiler-errors
    
    Add unsafe to extern blocks in style guide
    
    This goes after this is merged:
    
    - rust-lang#127921
    
    r? ``@traviscross``
    
    Tracking:
    
    - rust-lang#123743
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    9c132b2 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#128731 - RalfJung:simd-shuffle-vector, r=wo…

    …rkingjubilee
    
    simd_shuffle intrinsic: allow argument to be passed as vector
    
    See rust-lang#128738 for context.
    
    I'd like to get rid of [this hack](https://github.com/rust-lang/rust/blob/6c0b89dfac65be9a5be12f938f23098ebc36c635/compiler/rustc_codegen_ssa/src/mir/block.rs#L922-L935). rust-lang#128537 almost lets us do that since constant SIMD vectors will then be passed as immediate arguments. However, simd_shuffle for some reason actually takes an *array* as argument, not a vector, so the hack is still required to ensure that the array becomes an immediate (which then later stages of codegen convert into a vector, as that's what LLVM needs).
    
    This PR prepares simd_shuffle to also support a vector as the `idx` argument. Once this lands, stdarch can hopefully be updated to pass `idx` as a vector, and then support for arrays can be removed, which finally lets us get rid of that hack.
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    d2ff033 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#128935 - lqd:needs-zstd, r=Kobzol

    More work on `zstd` compression
    
    r? ``@Kobzol`` as we've discussed this.
    
    This is a draft to show the current approach of supporting zstd in compiletest, and making the tests using it unconditional.
    
    Knowing whether llvm/lld was built with `LLVM_ENABLE_ZSTD` is quite hard, so there are two strategies. There are details in the code, and we can discuss this approach. Until we know the config used to build CI artifacts, it seems our options are somewhat limited in any case.
    
    zlib compression seems always enabled, so we only check this in its dedicated test, allowing the test to ignore errors due to zstd not being supported.
    
    The zstd test is made unconditional in what it tests, by relying on `needs-llvm-zstd` to be ignored when `llvm.libzstd` isn't enabled in `config.toml`.
    
    try-job: x86_64-gnu
    try-job: x86_64-msvc
    try-job: x86_64-gnu-distcheck
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    e209b05 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#128942 - RalfJung:interpret-weak-memory, r=…

    …saethlin
    
    miri weak memory emulation: put previous value into initial store buffer
    
    Fixes rust-lang/miri#2164 by doing a read before each atomic write so that we can initialize the store buffer. The read suppresses memory access hooks and UB exceptions, to avoid otherwise influencing the program behavior. If the read fails, we store that as `None` in the store buffer, so that when an atomic read races with the first atomic write to some memory and previously the memory was uninitialized, we can report UB due to reading uninit memory.
    
    ``@cbeuw`` this changes a bit the way we initialize the store buffers. Not sure if you still remember all this code, but if you could have a look to make sure this still makes sense, that would be great. :)
    
    r? ``@saethlin``
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    427019e View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#129418 - petrochenkov:libsearch2, r=jieyouxu

    rustc: Simplify getting sysroot library directory
    
    It was very non-obvious that `sess.target_tlib_path`, `make_target_lib_path(...)`, and `sess.target_filesearch(...).search_paths()` result in the same sysroot library directory paths.
    They are however, indeed the same, because `sess.target_tlib_path` is initialized to `make_target_lib_path(...)` on `Session` creation, and they are used interchangeably.
    
    There are still some redundant calls to `make_target_lib_path` and other inconsistent ways to obtain sysroot directories, but fixing that requires some behavior changes, while this PR is a pure refactoring.
    Some places in the compiler even disagree on the number of sysroots - 1 (explicit `--sysroot` *or* default sysroot), 2 (explicit `--sysroot` *and* default sysroot), or an unclear number of `sysroot_candidates` every of which is considered.
    The logic currently using `sess.target_tlib_path` or equivalents assumes one sysroot.
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    42cd3c6 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#129490 - randomPoison:trusty-os-support, r=…

    …Urgau
    
    Add Trusty OS as tier 3 target
    
    This PR adds support for the [Trusty secure operating system](https://source.android.com/docs/security/features/trusty) as a Tier 3 supported target. This upstreams [the patch that we have been using](https://cs.android.com/android/platform/superproject/+/master:external/rust/crates/libc/patches/trusty.patch;l=1;drc=122e586e93a534160230dc10ae3474cf31dd8f7f) internally. This also revives rust-lang#103895 which was closed due to inactivity, and is being resumed now that time allows.
    
    And MCP has already been done for adding this platform: rust-lang/compiler-team/issues/568
    
    # Target Tier Policy Acknowledgements
    
    > A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.)
    
    - Nicole LeGare (``@randomPoison)``
    - Stephen Crane (``@rinon)``
    - As a fallback [email protected] can be contacted
    
    > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target.
    
    The two new Trusty targets, `aarch64-unknown-trusty` and `armv7-unknown-trusty` both follow the existing naming convention for similar targets.
    
    > Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it.
    
    👍
    
    > Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users.
    
    There are no known legal issues or license incompatibilities.
    
    > Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.
    
    👍
    
    > Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions.
    
    This PR only adds the targets for the platform. `std` support will be added once platform support is added to the libc crate, which depends on the language targets being added to rustc.
    
    > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary.
    
    👍
    
    > Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via ``@)`` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages.
    
    👍
    
    > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.
    
    👍
    
    > Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target. (Having support in a fork of the backend is not sufficient, it must be upstream.)
    
    👍
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    3c131a3 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#129536 - beetrees:f16-f128-inline-asm-aarch…

    …64, r=Amanieu
    
    Add `f16` and `f128` inline ASM support for `aarch64`
    
    Adds `f16` and `f128` inline ASM support for `aarch64`. SIMD vector types are taken from [the ARM intrinsics list](https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:`@navigationhierarchiesreturnbasetype=[float]&f:@navigationhierarchieselementbitsize=[16]&f:@navigationhierarchiesarchitectures=[A64]).` Based on the work of `@lengrongfu` in rust-lang#127043.
    
    Relevant issue: rust-lang#125398
    Tracking issue: rust-lang#116909
    
    `@rustbot` label +F-f16_and_f128
    
    try-job: aarch64-gnu
    try-job: aarch64-apple
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    8ea70e9 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#129559 - RalfJung:float-nan-semantics, r=th…

    …omcc
    
    float types: document NaN bit pattern guarantees
    
    Part of rust-lang#128288: document the guarantees we make for NaN bit patterns.
    
    Cc ``@tgross35``
    tgross35 authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    75ae913 View commit details
    Browse the repository at this point in the history