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

Merged
merged 36 commits into from
May 21, 2024
Merged

Rollup of 7 pull requests #125358

merged 36 commits into from
May 21, 2024

Commits on May 5, 2024

  1. Document all Apple targets in rustc's platform support

    - Fixed std support in top-level docs.
    - Added `*-apple-darwin` docs.
    - Added `i686-apple-darwin` docs.
    - Moved `aarch64-apple-ios-sim` to `*-apple-ios` and document all the
      iOS targets there.
    - Added `*-apple-ios-macabi` docs.
    - Add myself (madsmtm) as co-maintainer of most of these targets.
    madsmtm committed May 5, 2024
    Configuration menu
    Copy the full SHA
    0eb782d View commit details
    Browse the repository at this point in the history

Commits on May 11, 2024

  1. Configuration menu
    Copy the full SHA
    1d1981b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    579266a View commit details
    Browse the repository at this point in the history
  3. Add flag to sysroot

    diondokter committed May 11, 2024
    Configuration menu
    Copy the full SHA
    9ab0af8 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

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

Commits on May 17, 2024

  1. Configuration menu
    Copy the full SHA
    b964b00 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c30142 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f0b8da4 View commit details
    Browse the repository at this point in the history
  4. tidy fix

    Oneirical committed May 17, 2024
    Configuration menu
    Copy the full SHA
    abdaed2 View commit details
    Browse the repository at this point in the history
  5. missing import

    Oneirical authored May 17, 2024
    Configuration menu
    Copy the full SHA
    9d0b75f View commit details
    Browse the repository at this point in the history
  6. fix: swap the error codes

    Oneirical committed May 17, 2024
    Configuration menu
    Copy the full SHA
    8c43e54 View commit details
    Browse the repository at this point in the history
  7. Use _NSGetEnviron instead of environ on iOS/tvOS/watchOS/visionOS

    This should be slightly more correct, and matches the implementation in other programming languages:
    - [Python's `os.environ`](https:/python/cpython/blob/v3.12.3/Modules/posixmodule.c#L1562-L1566).
    - [Swift's `Darwin.environ`](https:/apple/swift-corelibs-foundation/blob/swift-5.10-RELEASE/CoreFoundation/Base.subproj/CFPlatform.c#L1811-L1812), though that library is bundled on the system, so they can change it if they want.
    - [Dart/Flutter](https:/dart-lang/sdk/blob/3.4.0/runtime/bin/platform_macos.cc#L205-L234), doesn't support environment variables on iOS.
    - Node seems to not be entirely consistent with it:
      - [`process.c`](https:/nodejs/node/blob/v22.1.0/deps/uv/src/unix/process.c#L38).
      - [`unix/core.c`](https:/nodejs/node/blob/v22.1.0/deps/uv/src/unix/core.c#L59).
    - [.NET/Xamarin](https:/dotnet/runtime/blob/v8.0.5/src/native/libs/configure.cmake#L1099-L1106).
    - [OpenJDK](https:/openjdk/jdk/blob/jdk-23%2B22/src/java.base/unix/native/libjava/ProcessEnvironment_md.c#L31-L33).
    madsmtm committed May 17, 2024
    Configuration menu
    Copy the full SHA
    6016bad View commit details
    Browse the repository at this point in the history
  8. Use _NSGetArgc/_NSGetArgv on iOS/tvOS/watchOS/visionOS

    If we're comfortable using `_NSGetEnviron` from `crt_externs.h`, there shouldn't be an issue with using these either, and then we can merge with the macOS implementation.
    
    This also fixes two test cases on Mac Catalyst:
    - `tests/ui/command/command-argv0.rs`, maybe because `[[NSProcessInfo processInfo] arguments]` somehow converts the name of the first argument?
    - `tests/ui/env-funky-keys.rs` since we no longer link to Foundation.
    madsmtm committed May 17, 2024
    Configuration menu
    Copy the full SHA
    8f18e4f View commit details
    Browse the repository at this point in the history

Commits on May 19, 2024

  1. Configuration menu
    Copy the full SHA
    1914c72 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abd5d0e View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Configuration menu
    Copy the full SHA
    1185a64 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9557b90 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    213351a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    38ad851 View commit details
    Browse the repository at this point in the history
  5. Deduplicate test command

    diondokter committed May 20, 2024
    Configuration menu
    Copy the full SHA
    0d23a71 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bd71c71 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f6cf103 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. simplify

    Oneirical committed May 21, 2024
    Configuration menu
    Copy the full SHA
    95c47d3 View commit details
    Browse the repository at this point in the history
  2. Reorder top-level attributes.

    And remove an unnecessary `feature(try_blocks)`.
    nnethercote committed May 21, 2024
    Configuration menu
    Copy the full SHA
    eb10eb2 View commit details
    Browse the repository at this point in the history
  3. Reorder some use items.

    nnethercote committed May 21, 2024
    Configuration menu
    Copy the full SHA
    d8ea468 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ce22232 View commit details
    Browse the repository at this point in the history
  5. Remove erroneous comment.

    The comment was originally in `src/librustc_mir/lib.rs`, but now that
    it's in `compiler/rustc_const_eval/src/lib.rs` it's no longer
    appropriate.
    nnethercote committed May 21, 2024
    Configuration menu
    Copy the full SHA
    c1d5b6a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ac847b2 View commit details
    Browse the repository at this point in the history
  7. Sort rustc_middle attributes.

    As is already done in several other crates, such as `rustc_errors`.
    nnethercote committed May 21, 2024
    Configuration menu
    Copy the full SHA
    3ac816a View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#124570 - nnethercote:misc-cleanups, r=micha…

    …elwoerister
    
    Miscellaneous cleanups
    
    A mix of small cleanups made while looking at various things.
    
    r? `@wesleywiser`
    matthiaskrgr authored May 21, 2024
    Configuration menu
    Copy the full SHA
    df59800 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#124772 - madsmtm:apple-platform-support-doc…

    …s, r=oli-obk
    
    Refactor documentation for Apple targets
    
    Refactor the documentation for Apple targets in `rustc`'s platform support page to make it clear what the supported OS version is and which environment variables are being read (`*_DEPLOYMENT_TARGET` and `SDKROOT`). This fixes rust-lang#124215.
    
    Note that I've expanded the `aarch64-apple-ios-sim` maintainers `@badboy` and `@deg4uss3r` to include being maintainer of all `*-apple-ios-*` targets. If you do not wish to be so, please state that, then I'll explicitly note that in the docs.
    
    Additionally, I've added myself as co-maintainer of most of these targets.
    
    r? `@thomcc`
    
    I think the documentation you've previously written on tvOS is great, have mostly modified it to have a more consistent formatting with the rest of the Apple target.
    
    I recognize that there's quite a few changes here, feel free to ask about any of them!
    
    ---
    
    CC `@simlay` `@Nilstrieb`
    
    `@rustbot` label O-apple
    matthiaskrgr authored May 21, 2024
    Configuration menu
    Copy the full SHA
    4a4883b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#125011 - diondokter:opt-for-size, r=Amanieu…

    …,kobzol
    
    Add opt-for-size core lib feature flag
    
    Adds a feature flag to the core library that enables the possibility to have smaller implementations for certain algorithms.
    
    So far, the core lib has traded performance for binary size. This is likely what most people want since they have big simd-capable machines. However, people on small machines, like embedded devices, don't enjoy the potential speedup of the bigger algorithms, but do have to pay for them. These microcontrollers often only have 16-1024kB of flash memory.
    
    This PR is the result of some talks with project members like `@Amanieu` at RustNL.
    There are some open questions of how this is eventually stabilized, but it's a similar question as with the existing `panic_immediate_abort` feature.
    
    Speaking as someone from the embedded side, we'd rather have this unstable for a while as opposed to not having it at all. In the meantime we can try to use it and also add additional PRs to the core lib that uses the feature flag in areas where we find benefit.
    
    Open questions from my side:
    - Is this a good feature name?
      - `panic_immediate_abort` is fairly verbose, so I went with something equally verbose
      - It's easy to refactor later
    - I've added the feature to `std` and `alloc` as well as they might benefit too. Do we agree?
      - I expect these to get less usage out of the flag since most size-constraint projects don't use these libraries often.
    matthiaskrgr authored May 21, 2024
    Configuration menu
    Copy the full SHA
    4abf179 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#125218 - Oneirical:easy-test-the-third, r=j…

    …ieyouxu
    
    Migrate `run-make/no-intermediate-extras` to new `rmake.rs`
    
    Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
    matthiaskrgr authored May 21, 2024
    Configuration menu
    Copy the full SHA
    7ef533b View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#125225 - madsmtm:ios-crt_externs.h, r=worki…

    …ngjubilee
    
    Use functions from `crt_externs.h` on iOS/tvOS/watchOS/visionOS
    
    Use `_NSGetEnviron`, `_NSGetArgc` and `_NSGetArgv` on iOS/tvOS/watchOS/visionOS, see each commit and the code comments for details. This allows us to unify more code with the macOS implementation, as well as avoiding linking to the `Foundation` framework (which is good for startup performance).
    
    The biggest problem with doing this would be if it lead to App Store rejections. After doing a bunch of research on this, while [it did happen once in 2009](https://blog.unity.com/engine-platform/unity-app-store-submissions-problem-solved), I find it fairly unlikely to happen nowadays, especially considering that Apple has later _added_ `crt_externs.h` to the iOS/tvOS/watchOS/visionOS SDKs, strongly signifying the functions therein is indeed supported on those platforms (even though they lack an availability attribute).
    
    That we've been overly cautious here has also been noted by `@thomcc` in rust-lang#117910 (comment).
    
    r? `@workingjubilee`
    
    `@rustbot` label O-apple
    matthiaskrgr authored May 21, 2024
    Configuration menu
    Copy the full SHA
    a8ee8d5 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#125266 - workingjubilee:stream-plastic-love…

    …, r=RalfJung,nikic
    
    compiler: add simd_ctpop intrinsic
    
    Fairly straightforward addition.
    
    cc `@rust-lang/opsem` new (extremely boring) intrinsic
    matthiaskrgr authored May 21, 2024
    Configuration menu
    Copy the full SHA
    fd975f7 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#125348 - tbu-:pr_doc_path_absolute, r=jhpratt

    Small fixes to `std::path::absolute` docs
    matthiaskrgr authored May 21, 2024
    Configuration menu
    Copy the full SHA
    e6e05d5 View commit details
    Browse the repository at this point in the history