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 8 pull requests #100799

Closed
wants to merge 38 commits into from

Commits on Jul 6, 2022

  1. unit tests that inspect LLVM output directly. This relies on a human …

    …being to confirm that the
    
    entries actually correspond to what is specified in each of the respective ABIs...
    
    updated to incorporate feedback: fix x86_64/i686 tests to use correct name for the corresponding llvm component.
    pnkfelix committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    7913b85 View commit details
    Browse the repository at this point in the history
  2. End-to-end regression test for 97463.

    incorporated review feedback, with comment explaining why this is calling CC
    instead of COMPILE_OBJ or NATIVE_STATICLIB. As drive-by, removed some other
    unnecessary commands from the recipe.
    pnkfelix committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    b2777ab View commit details
    Browse the repository at this point in the history
  3. fix issue 97463 using change suggested by nbdd0121.

    parameterized on target details to decide value-extension policy on calls, in order to address how Apple's aarch64 ABI differs from that on Linux and Windows.
    
    Updated to incorporate review feedback: adjust comment on new enum specifying
    param extension policy.
    
    Updated to incorporate review feedback: shorten enum names and those of its
    variants to make it less unwieldy.
    
    placate tidy.
    pnkfelix committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    8ae5a55 View commit details
    Browse the repository at this point in the history
  4. experiment: trying to encode the end-to-end test as a ui test via rus…

    …t_test_helpers. This instance is almost certainly insufficient because we need to force optimization flags for both the C and Rust sides of the code. but lets find out for sure.
    pnkfelix committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    dfdb017 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2022

  1. fix typo, thanks wesley

    Co-authored-by: Wesley Wiser <wwiser@gmail.com>
    pnkfelix and wesleywiser committed Aug 4, 2022
    Configuration menu
    Copy the full SHA
    99c0f91 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2022

  1. Ignore test on wasm

    wesleywiser committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    9bf3d5a View commit details
    Browse the repository at this point in the history
  2. Add pointer masking convenience functions

    This commit adds the following functions all of which have a signature
    `pointer, usize -> pointer`:
    - `<*mut T>::mask`
    - `<*const T>::mask`
    - `intrinsics::ptr_mask`
    
    These functions are equivalent to `.map_addr(|a| a & mask)` but they
    utilize `llvm.ptrmask` llvm intrinsic.
    
    *masks your pointers*
    WaffleLapkin committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    940f078 View commit details
    Browse the repository at this point in the history
  3. use shorter ptr_mask impl in cg cranelift

    Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
    WaffleLapkin and bjorn3 committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    876ff21 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    08d488b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8102e71 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    729334a View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2022

  1. fix cg cranelift

    Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
    WaffleLapkin and bjorn3 committed Aug 7, 2022
    Configuration menu
    Copy the full SHA
    1dfac52 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2022

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

Commits on Aug 9, 2022

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

Commits on Aug 13, 2022

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

Commits on Aug 16, 2022

  1. Revert "Revert "Allow dynamic linking for iOS/tvOS targets.""

    This reverts commit 16e10bf.
    
    # Conflicts:
    #	compiler/rustc_target/src/spec/apple_sdk_base.rs
    cutsoy committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    9233298 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2022

  1. Configuration menu
    Copy the full SHA
    e9e46c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    767239f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    944c6b6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    be2641a View commit details
    Browse the repository at this point in the history
  5. Add const-generics test.

    cjgillot committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    72acd94 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2022

  1. Do not use void pointer for ptr_mask intrinsic

    I couldn't find where exactly it's documented, but apperantly pointers to void
    type are invalid in llvm - void is only allowed as a return type of functions.
    WaffleLapkin committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    5abe2dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ac66baa View commit details
    Browse the repository at this point in the history
  3. add some Miri-only tests

    RalfJung committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    27b0444 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8c8dc12 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    438e49c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fbcdf2a View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2022

  1. Update codegen tests to accommodate the potential presence/absence of…

    … the
    
    extension operation depending on target architecture.
    pnkfelix committed Aug 19, 2022
    Configuration menu
    Copy the full SHA
    59cc718 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f47b61d View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2022

  1. remove unnecessary string searchings

    remove unnecessary string searchings for checking if function arguments have `&` and `&mut`
    TaKO8Ki committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    9735107 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#96946 - WaffleLapkin:ptr_mask, r=scottmcm

    Add pointer masking convenience functions
    
    This PR adds the following public API:
    ```rust
    impl<T: ?Sized> *const T {
        fn mask(self, mask: usize) -> *const T;
    }
    
    impl<T: ?Sized> *mut T {
        fn mask(self, mask: usize) -> *const T;
    }
    
    // mod intrinsics
    fn mask<T>(ptr: *const T, mask: usize) -> *const T
    ```
    This is equivalent to `ptr.map_addr(|a| a & mask)` but also uses a cool llvm intrinsic.
    
    Proposed in rust-lang#95643 (comment)
    
    cc ``@Gankra`` ``@scottmcm`` ``@RalfJung``
    
    r? rust-lang/libs-api
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    c61175f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#97800 - pnkfelix:issue-97463-fix-aarch64-ca…

    …ll-abi-does-not-zeroext, r=wesleywiser
    
    Aarch64 call abi does not zeroext (and one cannot assume it does so)
    
    Fix rust-lang#97463
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    c029bd0 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#99935 - CAD97:unstable-syntax-lints, r=petr…

    …ochenkov
    
    Reenable disabled early syntax gates as future-incompatibility lints
    
    - MCP: rust-lang/compiler-team#535
    
    The approach taken by this PR is
    
    - Introduce a new lint, `unstable_syntax_pre_expansion`, and reenable the early syntax gates to emit it
    - Use the diagnostic stashing mechanism to stash warnings the early warnings
    - When the hard error occurs post expansion, steal and cancel the early warning
    - Don't display any stashed warnings if errors are present to avoid the same noise problem that hiding type ascription errors is avoiding
    
    Commits are working commits, but in a coherent steps-to-implement manner. Can be squashed if desired.
    
    The preexisting `soft_unstable` lint seems like it would've been a good fit, but it is deny-by-default (appropriate for `#[bench]`) and these gates should be introduced as warn-by-default.
    
    It may be desirable to change the stash mechanism's behavior to not flush lint errors in the presence of other errors either (like is done for warnings here), but upgrading a stash-using lint from warn to error perhaps is enough of a request to see the lint that they shouldn't be hidden; additionally, fixing the last error to get new errors thrown at you always feels bad, so if we know the lint errors are present, we should show them.
    
    Using a new flag/mechanism for a "weak diagnostic" which is suppressed by other errors may also be desirable over assuming any stashed warnings are "weak," but this is the first user of stashing warnings and seems an appropriate use of stashing (it follows the "know more later to refine the diagnostic" pattern; here we learn that it's in a compiled position) so we get to define what it means to stash a non-hard-error diagnostic.
    
    cc ```@petrochenkov``` (seconded MCP)
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    71ce831 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#100129 - RalfJung:miri-test-libstd, r=thomcc

    add miri-test-libstd support to libstd
    
    - The first commit mirrors what we already have in liballoc.
    - The second commit adds some regression tests that only really make sense to be run in Miri, since they rely on Miri's extra checks to detect anything.
    - The third commit makes the MPSC tests work in reasonable time in Miri by reducing iteration counts.
    - The fourth commit silences some warnings due to code being disabled with `cfg(miri)`
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    ce9b9ab View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#100500 - cjgillot:verify-self-predicate, r=…

    …lcnr
    
    Ban references to `Self` in trait object substs for projection predicates too.
    
    Fixes rust-lang#100484
    Fixes rust-lang#100485
    
    r? ``@lcnr``
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    c4489dd View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#100636 - cutsoy:revert-77716, r=davidtwco

    Revert "Revert "Allow dynamic linking for iOS/tvOS targets.""
    
    This reverts commit 16e10bf (PR rust-lang#77716).
    
    The original original PR enabled `cdylib` builds for iOS. However this caused problems because:
    
    > This new feature in Rust 1.46 added a lot of headache for iOS builds with cdylib targets. cdylib target is near impossible to build if you are using any crate with native dependencies (ex. openssl, libsodium, zmq). You can't just find .so files for all architectures to perform correct linking. Usual workflow is the following:
    >
    > 1. You build staticlib and rely that native dependencies will be linked as frameworks later
    > 2. You setup right cocoapods in ObjectiveC/Swift wrapper.
    >
    > As cargo doesn't support platform-dependent crate types rust-lang#4881 as a result a lot of projects now broken on Rust 1.46
    
    However, this will be soon a thing of the past since 1.64 brings us the long awaited much anticipated `--crate-type` flag.
    
    > I see that this got merged recently: rust-lang/cargo#10083. The --crate-type flag will get stabilized in 1.64. In 1.64, you could still get a successful iOS staticlib with cargo build --crate-type=statclib even if the crate has cdylib targets too. If I'm not mistaken, this solves the problem too so this PR could be reverted in 1.64 with relatively little headache.
    
    So summing up, I think this PR can be reverted in 1.64. 🤞
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    51e5b6f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#100777 - pnkfelix:expand-codegen-tests-read…

    …me, r=TaKO8Ki
    
    elaborate how revisions work with FileCheck stuff in src/test/codegen
    
    elaborate how revisions work with FileCheck stuff in src/test/codegen
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    5d9fa0e View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#100796 - TaKO8Ki:remove-unnecessary-string-…

    …searching, r=compiler-errors
    
    Refactor: remove unnecessary string searchings
    
    This patch removes unnecessary string searchings for checking if function arguments have `&` and `&mut`.
    matthiaskrgr committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    d403a96 View commit details
    Browse the repository at this point in the history