forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
[RTE-475] Sync with upstream #19
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
Open
sardok
wants to merge
10,000
commits into
master-vme
Choose a base branch
from
sinan/rte-475-sync-upstream
base: master-vme
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+3,440,360
−998,292
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update cargo submodule 3 commits in 2394ea6cea8b26d717aa67eb1663a2dbf2d26078..801d9b4981dd07e3aecdca1ab86834c13615737e 2025-10-03 14:13:01 +0000 to 2025-10-04 13:30:15 +0000 - chore: Disabled `reserved_windows_name` test temporaily (rust-lang/cargo#16048) - Add panic=immediate-abort support to Cargo (rust-lang/cargo#16041) - Accessing each build script's `OUT_DIR` (rust-lang/cargo#15891)
…-syntax, r=ibraheemdev,fmease Document fully-qualified syntax in `as`' keyword doc
…mmerjake,tgross35 add CloneFromCell and Cell::get_cloned Tracking issue: rust-lang#145329
Bump unicode_data and printables to version 17.0.0 Unicode 17 ~~is not stable yet (release planned for 2025-09-09).~~ [has been released!](https://www.unicode.org/versions/Unicode17.0.0/) Update Unicode data and printables to [Unicode 17](https://www.unicode.org/versions/Unicode17.0.0/)
…ocs, r=tgross35 Fix atan2 inaccuracy in documentation Fixes rust-lang#136275
…cm,tgross35 add mem::conjure_zst Tracking issue: rust-lang#95383
…oratrieb interpret `#[used]` as `#[used(compiler)]` on illumos helps rust-lang#146169 not be as painful: fixes the illumos regression in rust-lang#140872, but `#[used(linker)]` is still erroneous on illumos generally. illumos' `ld` does not support a flag like either SHF_GNU_RETAIN or SHF_SUNW_NODISCARD, so there is no way to communicate `#[used(linker)]` for that target. Setting `USED_LINKER` to try results in LLVM setting SHF_SUNW_NODISCARD for Solaris-like targets, which is an unknown section header flag for illumos `ld` and prevents sections from being merged that otherwise would. As a motivating example, the `inventory` crate produces `#[used]` items to merge into `.init_array`. Because those items have an unknown section header flag they are not merged with the default `.init_array` with `frame_dummy`, and end up never executed. Downgrading `#[used]` to `#[used(compiler)]` on illumos keeps so-attributed items as preserved as they had been before rust-lang#140872. As was the case before that change, because rustc passes `-z ignore` to illumos `ld`, it's possible that `used` sections are GC'd at link time. rust-lang#146169 describes this unfortunate circumstance. ---- as it turns out, `tests/ui/attributes/used_with_archive.rs` had broken on `x86_64-unknown-illumos`, and this patch fixes it. the trials and tribulations of tier 2 :( r? ````@Noratrieb```` probably?
…ross35 std: `sys::net` cleanups This PR contains three improvements to the socket-based networking implementation (aa1263e is just to add the now missing `unsafe`). Best reviewed commit-by-commit.
…nt-change, r=lcnr Do not assert that a change in global cache only happens when concurrent Fixes rust-lang/trait-system-refactor-initiative#234 I think it should just be safe to remove this assert (rather than delaying a bug). If the previous and current result are the same, I wouldn't expect issues. r? lcnr
…c-in-my-llvm-components, r=Kobzol Return to needs-llvm-components being info-only Partially revert a535042 Even with non-LLVM codegen backends, we want to allow for annotations that express dependencies to LLVM-specific parts of the test suite. This includes `//@ needs-llvm-components`, which just allows checking that LLVM is built with relevant target support before the test is run. It does not assert the test cannot work with another codegen backend.
…youxu bless autodiff batching test This pr blesses a broken test and unblocks running rust in the Enzyme CI: EnzymeAD/Enzyme#2430 Enzyme is the plugin used by our std::autodiff and (future) std::batching modules, both of which are not build by default. In the near future we also hope to enable std::autodiff in the Rust CI. This test is the only one to combine two features, automatic differentiation and batching/vectorization. This combination is even more experimental than either feature on its own. I have a wip branch in which I enable more vectorization/batching and as part of that I'll think more about how to write those tests in a robust way (and likely change the interface). Until that lands, I don't care too much about what specific IR we generate here; it's just nice to track changes. r? compiler
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#142670 (Document fully-qualified syntax in `as`' keyword doc) - rust-lang#145685 (add CloneFromCell and Cell::get_cloned) - rust-lang#146330 (Bump unicode_data and printables to version 17.0.0) - rust-lang#146451 (Fix atan2 inaccuracy in documentation) - rust-lang#146479 (add mem::conjure_zst) - rust-lang#147117 (interpret `#[used]` as `#[used(compiler)]` on illumos) - rust-lang#147190 (std: `sys::net` cleanups) - rust-lang#147251 (Do not assert that a change in global cache only happens when concurrent) - rust-lang#147280 (Return to needs-llvm-components being info-only) - rust-lang#147315 (bless autodiff batching test) r? `@ghost` `@rustbot` modify labels: rollup
First commit treats all constants containing a macro call as non-local and renames `eval_simple` to be a little clearer. Second commit removes `CoreConstant` and treats most of them as though they were local. A couple of the constants like `usize::MAX` are treated as non-local as different targets may have different values. `const_is_empty` will now ignore non-local constants since there's no guarantee that they are the same across all targets/features/versions. The third commit just changes some `eval` calls to `eval_local`. Most of these were style lints which shouldn't be assuming the value of a constant won't ever change. changelog: none
…ethlin Avoid getting `dep_dep_node` unnecessarily. It's gotten on a hot path but only for use within `debug!`. r? `@saethlin`
Others in the file skip the module name
compiletest: Make `DirectiveLine` responsible for name/value splitting - Follow-up to rust-lang#147170. --- Now that all of the directive-parsing functions have access to a `DirectiveLine`, we can move all of the ad-hoc name/value splitting code into `DirectiveLine` itself, making directive parsing simpler and more consistent. The first commit is just moving code into a submodule, so the actual changes can be seen in the subsequent commits. r? jieyouxu
…r=jieyouxu Add documentation about unwinding to wasm targets This commit adds some documentation about the state of `-Cpanic=unwind` for the following wasm targets: * `wasm32-unknown-unknown` * `wasm32-wasip1` * `wasm32-wasip2` * `wasm32v1-none` Notably it's possible to use `-Cpanic=unwind` with `-Zbuild-std` and it's also mentioned that there are no concrete proposals at this time to adding a new set of targets which support unwinding. My hunch is that in a few years' time it would make sense to enable it by default on these targets (except for `wasm32v1-none`) but that's a problem for future folks to debate. For now this is an attempt to document the status quo.
Port the implemention of SIMD intrinsics from Miri to const-eval Ported the implementation of most SIMD intrinsics from Miri to rustc_const_eval. Remaining are - Math functions (as per `@RalfJung's` suggestions) - FMA (non-deterministic) - Funnel Shifts (not implemented in Miri yet) - Unordered reduction intrinsics (not implemented in Miri yet)
…mdev give a better example why `std` modules named like primitives are needed A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed). Related to rust-lang#146882.
…lathar,jieyouxu bootstrap: add `Builder::rustc_cmd` that includes the lib path When building with `rust.rpath = false`, every `rustc` invocation needs to include the library path as well. I particularly ran into this in `generate_target_spec_json_schema` when testing 1.91-beta in Fedora, where we do disable rpath for our system builds. The new helper function will hopefully encourage the right thing going forward.
…d, r=joboet Add diagnostic items for `pub mod consts` of FP types They will be used in Clippy.
…Jung,joboet specialize slice::fill to use memset when possible It helps const eval performance rust-lang/miri#4616, debug builds and the gcc backend. Previously attempted in rust-lang#83245 but reverted due to unsoundness rust-lang#87891 around potentially-uninitialized types. This PR only handles primitives where the problem does not arise. split off from rust-lang#147294
…=JonathanBrouwer Fix double warnings on `#[no_mangle]` Fixes 2 out of 3 cases in rust-lang#147417 The fix on closures removes the old error and marks closures as an error target. The fix on consts adds `AllowSilent` to to ignore a target, and uses the old error because that one has a nice suggestion. r? ````@jdonszelmann````
…crum Clarify how to remediate the panic_immediate_abort error Users who build `core` for the sole purpose of enabling `panic_immediate_abort` might expect "`panic_immediate_abort` is now a real panic strategy" to mean that setting `panic = "immediate-abort"` in `Cargo.toml` or `-Cpanic=immediate-abort` in `RUSTFLAGS` to be sufficient for migration. But this is not the case, `core` still needs to be built for those changes to take effect. See rust-lang#146974 for additional context. See rust-lang#147286 and rust-lang/cargo#16042 for the revelant tracking issues.
…miasko Do not invalidate CFG caches in CtfeLimit. This does not matter much, as no optimization pass runs after `CtfeLimit`, but I still find the code cleaner.
format: some small cleanup Some small cleanup and some additional comments I did while trying to understand this code.
…ate_global, r=nikic refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global` Since it can easily be implemented using the existing LLVM C API in terms of `LLVMAddGlobal` and `LLVMSetLinkage` and `define_private_global` was only used in one place. Work towards rust-lang#46437
… r=Kivooeo,oli-obk Prefer to use repeat_n over repeat().take() More from rust-lang#147464, but batch processed with `ast-grep` to find and replace. second commit add notes for library: rust-lang@affaf53 r? ``@RalfJung``
compiletest: Isolate public APIs and minimize public surface area As part of my ongoing efforts to improve directive parsing, I would like to be able to make internal changes without worrying about whether they're going to break the rustdoc-gui-test tool. That tool currently uses compiletest as a dependency to help with directive parsing. This PR therefore isolates all of compiletest's public APIs into two dedicated modules, one used by rustdoc-gui-test, and one used by the compiletest binary in `compiletest/src/bin/main.rs`. All other modules (and crate-root items) are then made non-`pub` to achieve the API isolation. Doing so reveals some unused items, which have been removed. (To reduce the amount of immediate textual churn, this PR does not comprehensively replace `pub` with `pub(crate)` throughout the whole crate; that could be done in a follow-up PR.) --- Ideally, rustdoc-gui-test would not depend on compiletest at all, but properly fixing that is out of scope for this PR. - rust-lang#143827 r? jieyouxu
Rollup of 12 pull requests Successful merges: - rust-lang#146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - rust-lang#147373 (give a better example why `std` modules named like primitives are needed) - rust-lang#147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - rust-lang#147420 (Add diagnostic items for `pub mod consts` of FP types) - rust-lang#147457 (specialize slice::fill to use memset when possible) - rust-lang#147467 (Fix double warnings on `#[no_mangle]`) - rust-lang#147470 (Clarify how to remediate the panic_immediate_abort error) - rust-lang#147480 (Do not invalidate CFG caches in CtfeLimit.) - rust-lang#147481 (format: some small cleanup) - rust-lang#147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - rust-lang#147489 (Prefer to use repeat_n over repeat().take()) - rust-lang#147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
This is useful for ensuring that changes to compiletest haven't broken rustdoc-gui-test.
…cation, r=Zalathar PassWrapper: use non-deprecated lookupTarget method This avoids an extra trip through a triple string by directly passing the Triple, and has been available since LLVM 21. The string overload was deprecated today and throws an error on our CI for HEAD due to -Werror paranoia, so we may as well clean this up now and also skip the conversion on LLVM 21 since we can. `@rustbot` label llvm-main
…Kobzol Do `x check` on various bootstrap tools in CI These tools aren't included in a default `x check`, but checking them locally is still useful for maintainers working on the tools themselves: - bootstrap - bump-stage0 - compiletest - coverage-dump - linkchecker - run-make-support - rustdoc-gui-test This PR therefore explicitly checks them in one CI job, to ensure that check builds for them continue to work.
… r=Zalathar remove intrinsic wrapper functions from LLVM bindings As discussed on llvm/llvm-project#162500 there is no good reason to implement these intrinsic function via the LLVM wrapper instead we now just implement them via `call_intrinsic` like all the other intrinsic functions. Work towards rust-lang#46437
Rollup of 3 pull requests Successful merges: - rust-lang#147446 (PassWrapper: use non-deprecated lookupTarget method) - rust-lang#147473 (Do `x check` on various bootstrap tools in CI) - rust-lang#147509 (remove intrinsic wrapper functions from LLVM bindings) r? `@ghost` `@rustbot` modify labels: rollup
Perform InstSimplify before ReferencePropagation. `InstSimplify` clears CFG caches. But it currently happens between `ReferencePropagation` and `GVN`, which both use dominators, a quite expensive computation. r? `@ghost`
…oyment-target, r=davidtwco Set the minimum deployment target for `aarch64-apple-watchos` To match what's done in LLVM 21 and Xcode 26, watchOS 26 is the first OS version that actually runs true Aarch64 binaries. This affects the object files we create, and the linker invocation when using `-Clinker=ld`. See also investigation in rust-lang#147223.
… r=davidtwco cmse: improve error messages tracking issue: rust-lang#81391 tracking issue: rust-lang#75835 Improves the cmse error messages (e.g. by using more accurate spans), and attempts to clean up the control flow a bit. This is partially in preparation for one final addition: warnings when `union` types or types with niches cross the security boundary. That will be a folllow-up. Meant to be reviewed commit-by-commit r? ``@davidtwco``
x86_64-bigint-helpers test: update test assertion to cover registers r8 and r9 Adapts the test expectation to cover the case where a register like `r9` is chosen. Update is similar to the other such expectation in the previous function in the same test file. Found by our experimental rust + LLVM @ HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/40528/steps/canvas?sid=0199c8d7-f65a-4bbc-8d7f-e62d4ddcc65e#0199c8d7-f7ab-464d-a0fd-b4b8862a11d3/1047-1175 r? durin42 ``@rustbot`` label: +llvm-main
…iaskrgr Rollup of 2 pull requests Successful merges: - rust-lang#147479 (cmse: improve error messages) - rust-lang#147523 (x86_64-bigint-helpers test: update test assertion to cover registers r8 and r9) r? `@ghost` `@rustbot` modify labels: rollup
6f60397 to
435fdc6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The toolchain structure changed over the time. It changes from
targetdirectory contains all specific stdlib modules (like net, os, process etc) to stdlib modules directory contain target specific files.Here are the notes taken during migration.
====
In
src/bootstrap:fortanixvmeas target to be ignored by stage0 compiler.====
In
compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_fortanixvme.rsTargetMetadatadata_layoutof Fortanixvme target spec with musl target.====
In
library/Cargo.tomlfilescompiler_builtinsasvsock(patched) uses it.====
library/std
src/io/errors.rs:io::ErrorKind::FilesystemQuotaExceeded -> io::ErrorKind::QuotaExceeded
io::const_io_error -> io::const_error
src/sys/args/unix.rs:The interface of
mod impis changed. Now themod impexpected to havefunction with the following signature:
pub fn argc_argv() -> (isize, *const *const c_char).This function is called from
pub fn args()free function within this module. Re-wrote the fortanixvme impl.src/sys/net/connection/fortanixvme.rs:This file is moved from
src/sys/pal/unix/fortanixvme/net.rs.Changelist:
pub fn lookup_host(host: &str, port: u16) -> io::Result<LookupHost>function as required bysrc/net/socket_addr.rs.Implementation of it is on par with the relevant sgx implementation.
fn each_addr<A: ToSocketAddrs, F, T>(addr: A, mut f: F) -> io::Result<T>.Implementation of it is on par with the relevant sgx implementation.
Command::spawnin (src/sys/process/unix/unix.rs) requiresSocket::new_pairin unix-like os.Added
Socket::new_pair()(src/sys/net/connection/fortanixvme.rs). The implementation is extracted fromsrc/sys/net/connection/unix.rsfor linux target os.io_err_to_addrbecause it is no longer needed witheach_addraddition. Consequently,NonIpSockAddr::hostis removed.LookupHost::portis removed.src/sys/net/connection/socketTcpStream::read_buf.src/net/tcp.rsTcpStream::read_buf.Tests:
Disabled for fortanixvme target
tests/pipe_subprocess.rs(test level)tests/process_spawning.rs(module level)tests/switch-stdout.rssrc/io/copy/tests.rs(test level)