Commit Graph

257036 Commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
4ca52f1869
Rollup merge of #125465 - weihanglo:opt-dist-vendor, r=Mark-Simulacrum
bootstrap: vendor crates required by opt-dist to collect profiles

These are the default package set required by opt-dist to correctly work,
hence for people wanting to build a production grade of rustc in a
sandboxed / air-gapped environment, these need to be vendored.

The size of `rustc-src-nightly.tar.xz` before and after this change:

* Before: 298M
* After: 323M (+8%)

Size change might or might not be a concern.
See the previous discussion: https://github.com/rust-lang/rust/pull/125166#issuecomment-2113626468

Previous efforts on making:

* https://github.com/rust-lang/rust/pull/125125
* https://github.com/rust-lang/rust/pull/125166

---

Note that extra works still need to be done to make it fully vendored.

* The current pinned rustc-perf uses `tempfile::Tempdir` as the working
  directory when collecting profiles from some of these packages.
  This "tmp" working directory usage make it impossible for Cargo to pick
  up the correct vendor sources setting in `.cargo/config.toml` bundled
  in the rustc-src tarball. [^1]
* opt-dist verifies the final built rustc against a subset of rustc test
  suite. However it rolls out its own `config.toml` without setting
  `vendor = true`, and that results in `./vendor/` directory removed.
  [^2]

[^1]: 4f313add60/collector/src/compile/benchmark/mod.rs (L164-L173)
[^2]: 606afbb617/src/tools/opt-dist/src/tests.rs (L62-L77)
2024-06-09 19:16:20 +01:00
许杰友 Jieyou Xu (Joe)
61671a7e34
Rollup merge of #125253 - sunsided:feature/FRAC_1_SQRT_PI, r=Mark-Simulacrum
Add `FRAC_1_SQRT_2PI` constant to f16/f32/f64/f128

This adds the `FRAC_1_SQRT_2PI` to the `f16`, `f32`, `f64` and `f128` as [`1/√(2π)`](https://www.wolframalpha.com/input?i=1%2Fsqrt%282*pi%29). The rationale is that while `FRAC_1_SQRT_PI` already exists, [Gaussian calculations](https://en.wikipedia.org/wiki/Gaussian_function) for random normal distributions require a `1/(σ√(2π))` term, which could then be directly expressed e.g. as `f32::FRAC_1_SQRT_2PI / sigma`.

The actual value is approximately `1/√(2π) = 0.3989422804014326779399460599343818684758586311649346576659258296…`. Truncated/rounded forms were used for the individual types.

---

~~I did not any of the `#[unstable]` attributes since I am not aware of their implications.~~

**Edit:** I applied the stability attributes from the surrounding types according to what seemed most likely correct. I believe the `more_float_constants` feature marker is incorrectly applied, but I wasn't sure how to proceed.
2024-06-09 19:16:19 +01:00
许杰友 Jieyou Xu (Joe)
f000b428bd
Rollup merge of #125041 - scottmcm:gvn-for-from-raw-parts, r=cjgillot
Enable GVN for `AggregateKind::RawPtr`

Looks like I was worried for nothing; this seems like it's much easier than I was originally thinking it would be.
r? `@cjgillot`

This should be useful for `x[..4]`-like things, should those start inlining enough to expose the lengths.
2024-06-09 19:16:19 +01:00
Edward Shen
d9f78cb793
rustdoc: Add support for --remap-path-prefix
Adds --remap-path-prefix as an unstable option. This is implemented to
mimic the behavior of rustc's --remap-path-prefix but with minor
adjustments.

This flag similarly takes in two paths, a prefix to replace and a
replacement string.
2024-06-09 10:34:54 -07:00
bors
65d1a73aab Auto merge of #125999 - XrXr:dist-aarch64-gcc-13, r=Kobzol
ci: use GCC 13 as cross compiler in `dist-aarch64-linux`

I'm proposing this GCC upgrade since it addresses bug https://github.com/rust-lang/rust/issues/125619. The
regression in question affects stable release consumers who tend to have
no exposure to Rust build tools, so if at all possible, I would like to
have it resolved in the next stable release. I have tried to fix the bug
in `compiler-builtins`, which led to submitting a PR for `compiler-rt`
in upstream LLVM, but it may take a long time before these upstreams
address this regression.

A summary of why upgrading GCC solves the regression follows.
`__multc3()` is a builtin function `compiler-builtins` exposes for
specifically aarch64, non-Windows targets [1]. The object file for it is
included in `staticlib` archives through `libstd`. The implementation
for `__multc3()` is from `multc3.c`, part of LLVM's `compiler-rt`.
Upstream `compiler-rt` normally builds the C file using the Clang
from the same LLVM version. On the other hand, `compiler-builtins`
builds the C file using GCC, outside of the usual LLVM build system.
The upstream implementation doesn't have feature detection which
works for GCC version older than 10, and ends up producing an
unlinkable object.

Upstream LLVM might be slow to respond to this issue as they might deem
`compiler-builtin` as doing something out of the ordinary from their
perspective. They might reasonably assume everyone builds `compiler-rt`
through LLVM's build system.

I have done the following to test this change:
 - verified that a local build without this patch exhibits the
   regression.
 - verified that with this patch, the object for `__multc3()` has no
   reference to undefined functions in the symbol table.
 - verified that with this patch, `rustc` is usable to build Ruby with
   YJIT, and that the reported regression is resolved.

Since `loongarch64-linux-gnu` already uses GCC 13.2.0, I hope we can upgrade without issues.

try-job: dist-aarch64-linux

[1]: c04eb9e1af/build.rs (L524-L539)
2024-06-09 16:46:02 +00:00
Weihang Lo
377870386f
tidy: add license exceptions for rustc-perf
`ring` is included because it is an optional dependency of `hyper`,
which is a training data in rustc-pref for optimized build.
The license of it is generally `ISC AND MIT AND OpenSSL`,
though the `package.license` field is not set.

See https://github.com/briansmith/ring/issues/902

`git+https://github.com/rust-lang/team` git source is from
`rust_team_data`, which is used by `site` in src/tools/rustc-perf.
This doesn't really a part of the compiler,
so doesn't really affect the bootstrapping process.

See https://github.com/rust-lang/rustc-perf/pull/1914.
2024-06-09 12:33:11 -04:00
Weihang Lo
e24be071e3
feat: vendor crates required by opt-dist to collect profiles
These are the default package set required by opt-dist to correctly work,
hence for people wanting to build a production grade of rustc in a
sandboxed / air-gapped environment, these need to be vendored.

The size of `rustc-src-nightly.tar.xz` before and after this change:

* Before: 298M
* After: 323M (+8%)

These crates are the default set of packages required by opt-dist
to correctly work, hence for people wanting to build a production grade
of rustc in an sandboxed / air-gapped environment, these need to be vendored.

The size of `rustc-src-nightly.tar.xz` before and after this change:

* Before: 298M
* After: 323M (+8%)

Size change might or might not be a concern.
See the previous discussion: https://github.com/rust-lang/rust/pull/125166#issuecomment-2113626468

Previous efforts on making:

* https://github.com/rust-lang/rust/pull/125125
* https://github.com/rust-lang/rust/pull/125166

---

Note that extra works still need to be done to make it fully vendored.

* The current pinned rustc-perf uses `tempfile::Tempdir` as the working
  directory when collecting profiles from some of these packages.
  This "tmp" working directory usage make it impossible for Cargo to pick
  up the correct vendor sources setting in `.cargo/config.toml` bundled
  in the rustc-src tarball. [^1]
* opt-dist verifies the final built rustc against a subset of rustc test
  suite. However it rolls out its own `config.toml` without setting
  `vendor = true`, and that results in `./vendor/` directory removed.
  [^2]

[^1]: 4f313add60/collector/src/compile/benchmark/mod.rs (L164-L173)
[^2]: 606afbb617/src/tools/opt-dist/src/tests.rs (L62-L77)
2024-06-09 12:33:11 -04:00
Josh Stone
4977608f72 Add release notes for 1.79.0 2024-06-09 12:31:12 -04:00
许杰友 Jieyou Xu (Joe)
d3b1367c43 Autolabel run-make tests, remind to update tracking issue
- Autolabel PRs modifying `tests/run-make/` and
  `src/tools/run-make-support/` with `X-run-make` label.
- Add reminder to update the tracking issue
  <https://github.com/rust-lang/rust/issues/121876>
  if applicable when `tests/run-make/` is modified by a PR.
2024-06-09 15:52:41 +00:00
bors
7bb0ef4902 Auto merge of #126193 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-06-09 14:37:00 +00:00
Chris Denton
3606818010
Migrate more things to WinError 2024-06-09 14:29:28 +00:00
bors
212841e17c Auto merge of #126166 - matthiaskrgr:crsh, r=jieyouxu
tests: add more crashes

r? `@jieyouxu`
2024-06-09 12:26:10 +00:00
bors
ad85a20031 Auto merge of #3661 - tiif:fix/eventfd, r=RalfJung
Follow up PR for eventfd shim

Follow up of https://github.com/rust-lang/miri/pull/3650
2024-06-09 12:15:39 +00:00
ivan-shrimp
041e204e0d fix NonZero doctest inconsistencies 2024-06-09 19:45:12 +08:00
tiif
69512c7b1e Follow up fix for eventfd shim 2024-06-09 19:44:06 +08:00
bors
b5ae8bdb01 Auto merge of #3663 - RalfJung:timeouts, r=RalfJung
don't panic if time computaton overflows

Let the thread blocking system handle timeout computation, and on overflows we just set the timeout to 1h.
2024-06-09 11:11:26 +00:00
Ralf Jung
87c4d29ce2 don't panic if time computaton overflows 2024-06-09 13:07:36 +02:00
bors
509eec19c4 Auto merge of #3653 - tiif:bug/futex_ice, r=RalfJung
Fix futex with large timeout ICE

Fixes #3647.

This PR changed the type of ``nanoseconds`` from ``u64`` to ``u128``. In ``duration_since``, nanoseconds is manually converted to second by dividing it with 1e9. But overflow is still possible.
2024-06-09 10:18:56 +00:00
tiif
40182becc3 Run cargo fmt 2024-06-09 18:00:58 +08:00
tiif
21d66afb8f Saturate to u64::MAX 2024-06-09 18:00:58 +08:00
byt
e85c521f37 Checked add for duration update
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-06-09 18:00:58 +08:00
byt
d0fb350b6a Add comment for u128 to u64 conversion.
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-06-09 18:00:58 +08:00
tiif
aa8323585c Move duration division out 2024-06-09 18:00:58 +08:00
tiif
9cf04b5a22 Use modulo operation to convert nanosecond to Duration 2024-06-09 18:00:58 +08:00
tiif
9f60709ffd Remove test 2024-06-09 18:00:58 +08:00
tiif
0bca4e1a22 Convert u128 to nanosecond 2024-06-09 18:00:58 +08:00
tiif
844450ae3a First attempt 2024-06-09 18:00:58 +08:00
Ralf Jung
d5fb8257e7 interpret: do not ICE on padded non-pow2 SIMD vectors 2024-06-09 11:54:23 +02:00
Jakub Beránek
fbe5015480
Fix documentation for impl_common_helpers in run-make-support 2024-06-09 11:52:16 +02:00
bors
de822dc602 Auto merge of #3662 - RalfJung:simd-bitmask, r=RalfJung
simd_bitmask: work correctly for sizes like 24
2024-06-09 09:48:26 +00:00
Ralf Jung
ba45198c9b use strict ops in some places 2024-06-09 11:44:05 +02:00
Ralf Jung
110b092203 simd_bitmask: work correctly for sizes like 24 2024-06-09 11:44:05 +02:00
bors
4f3a276ff1 Auto merge of #126185 - matthiaskrgr:rollup-72dn1s2, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #126137 (tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs)
 - #126146 (std::unix::process adding few specific freebsd signals to be able to id.)
 - #126155 (Remove empty test suite `tests/run-make-fulldeps`)
 - #126168 (std::unix::os current_exe implementation simplification for haiku.)
 - #126175 (Use --quiet flag when installing pip dependencies)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-09 09:37:06 +00:00
Matthias Krüger
8875fd1ff4
Rollup merge of #126175 - Kobzol:tidy-install-pip-quiet, r=tgross35
Use --quiet flag when installing pip dependencies

Fixes: https://github.com/rust-lang/rust/issues/126164

This still prints an error if any occurs.
2024-06-09 10:17:10 +02:00
Matthias Krüger
cfd44ec7e4
Rollup merge of #126168 - devnexen:current_exe_haiku_simpl, r=ChrisDenton
std::unix::os current_exe implementation simplification for haiku.

_get_net_image_info is a bit overkill as it allows to get broader informations about the process.
2024-06-09 10:17:09 +02:00
Matthias Krüger
246fc285de
Rollup merge of #126155 - Zalathar:run-make-fulldeps, r=onur-ozkan
Remove empty test suite `tests/run-make-fulldeps`

After #109770, there were only a handful of tests left in the run-make-fulldeps suite.

As of #126111, there are no longer *any* run-make-fulldeps tests, so now we can:

- Remove the directory
- Remove related bootstrap/compiletest code
- Remove various other references in CI scripts and documentation.

By removing this suite, we also no longer need to worry about discrepancies between it and ui-fulldeps, and we don't have to worry about porting tests from Makefile to [rmake](https://github.com/rust-lang/rust/issues/121876) (or whether rmake even works with fulldeps).
2024-06-09 10:17:09 +02:00
Matthias Krüger
d24d937a55
Rollup merge of #126146 - devnexen:signal_fbsd, r=ChrisDenton
std::unix::process adding few specific freebsd signals to be able to id.
2024-06-09 10:17:08 +02:00
Matthias Krüger
39fe991dd9
Rollup merge of #126137 - Enselic:normalize-generic-arg, r=compiler-errors
tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs

This adds a regression test for an ICE "accidentally" fixed by https://github.com/rust-lang/rust/pull/101947 that does not add a test for this particular case.

Closes #107564.

I have confirmed the added test code fails with `nightly-2023-01-09` (and passes with `nightly-2023-01-10` and of course recent `nightly`).
2024-06-09 10:17:08 +02:00
Matthias Krüger
0f8513a51c tests: add more crashes 2024-06-09 10:16:12 +02:00
bors
773415d28f Auto merge of #3660 - RalfJung:wrong-error, r=RalfJung
simd_select_bitmask: fix intrinsic name in error

*oops*
2024-06-09 07:58:08 +00:00
Ralf Jung
91e53aa8ed simd_select_bitmask: fix intrinsic name in error 2024-06-09 09:56:30 +02:00
bors
b3ca6ee18a Auto merge of #126163 - RalfJung:simd-packed, r=calebzulawski,workingjubilee
simd packed types: remove outdated comment, extend codegen test

It seems like https://github.com/rust-lang/rust/pull/125311 made that check in codegen unnecessary?

r? `@workingjubilee` `@calebzulawski`
2024-06-09 07:28:47 +00:00
bors
d5fa08cad8 Auto merge of #3659 - RalfJung:bitmask-too-large, r=RalfJung
simd_bitmask: nicer error when the mask is too big

Cc https://github.com/rust-lang/miri/issues/3658
2024-06-09 07:11:28 +00:00
Ralf Jung
a13a9ab759 simd_bitmask: nicer error when the mask is too big 2024-06-09 09:09:23 +02:00
clubby789
d42c9607f8 Run cargo update 2024-06-09 07:47:51 +01:00
clubby789
dcd03aadd2 Update r-efi 2024-06-09 07:47:50 +01:00
clubby789
9d85dfc3e6 Update icu4x dependencies 2024-06-09 07:47:42 +01:00
Zalathar
5223bf4474 Remove empty test suite tests/run-make-fulldeps 2024-06-09 14:38:37 +10:00
Zalathar
0f8c3adc68 Make job x86_64-gnu-debug run a subset of run-make tests
It looks like this job was intending to run all of the `needs-matching-clang`
tests (since they don't run without `RUSTBUILD_FORCE_CLANG_BASED_TESTS`), but
over time developed two problems:

- The tests it cares about were moved from run-make-fulldeps to run-make.
- Some of the relevant tests don't actually have "clang" in their name.

Switching to run-make solves the first problem, but we still don't run the
tests without "clang" in their name, because some of them are currently broken.
2024-06-09 14:37:22 +10:00
bors
13423befc4 Auto merge of #126087 - jieyouxu:rmake-docs, r=Kobzol
run-make: add some basic docs about the test suite's setup

r? `@Kobzol`
2024-06-09 03:18:49 +00:00