Commit Graph

1998 Commits

Author SHA1 Message Date
Matthias Krüger
d075b6c16d
Rollup merge of #111393 - klensy:win-0.48, r=oli-obk
bump windows crate 0.46 -> 0.48

This drops duped version of crate(0.46), reduces `rustc_driver.dll` ~800kb and reduces exported functions number from 26k to 22k.

Also while here, added `tidy-alphabetical` sorting to lists in tidy allowed lists.
2023-05-12 07:11:12 +02:00
Ralf Jung
2c88ee8e45 update lockfile 2023-05-11 08:05:07 +02:00
klensy
3c03cce341 bump windows crate 0.46 -> 0.48 in workspace 2023-05-09 18:20:13 +03:00
bors
7e7483d26e Auto merge of #110152 - ChrisDenton:windows-sys, r=thomcc
Start using `windows sys` for Windows FFI bindings in std

Switch to using windows-sys for FFI. In order to avoid some currently contentious issues, this uses windows-bindgen to generate a smaller set of bindings instead of using the full crate.

Unlike the windows-sys crate, the generated bindings uses `*mut c_void` for handle types instead of `isize`. This to sidestep opsem concerns about mixing pointer types and integers between languages. Note that `SOCKET` remains defined as an integer but instead of being a usize, it's changed to fit the [standard library definition](a41fc00eaf/library/std/src/os/windows/raw.rs (L12-L16)):

```rust
#[cfg(target_pointer_width = "32")]
pub type SOCKET = u32;
#[cfg(target_pointer_width = "64")]
pub type SOCKET = u64;
```

The generated bindings also customizes the `#[link]` imports. I hope to switch to using raw-dylib but I don't want to tie that too closely with the switch to windows-sys.

---

Changes outside of the bindings are, for the most part, fairly minimal (e.g. some differences in `*mut` vs. `*const` or a few types differ). One issue is that our own bindings sometimes mix in higher level types, like `BorrowedHandle`. This is pretty adhoc though.
2023-05-09 05:20:41 +00:00
Michael Goulet
68594142b1
Rollup merge of #111004 - clubby789:migrate-mir-transform, r=oli-obk
Migrate `mir_transform` to translatable diagnostics

cc #100717
2023-05-08 09:30:22 -07:00
Yuki Okushi
4df84a1e4e
Rollup merge of #110638 - nikarh:vita, r=Mark-Simulacrum
STD support for PSVita

This PR adds std support for `armv7-sony-vita-newlibeabihf` target.

The work here is fairly similar to #95897, just for a different target platform.

This depends on the following pull requests:

rust-lang/backtrace-rs#523
rust-lang/libc#3209
2023-05-08 19:41:49 +09:00
bors
ad6b20bf52 Auto merge of #111306 - Urgau:hashbrown-std-0.13, r=Amanieu
Update hashbrown from 0.12.3 to 0.13.1 for std

This PR updates hashbrown from 0.12.3 to 0.13.1 for std.

r? `@Amanieu`
2023-05-07 22:51:44 +00:00
Nikolay Arhipov
3ba3df3764 PS Vita std support 2023-05-07 18:57:43 +03:00
Urgau
0b9feea0a4 Update hashbrown from 0.12.3 to 0.13.1 for std 2023-05-07 00:35:55 +02:00
Matthias Krüger
77004eafea
Rollup merge of #110610 - spastorino:smir-terminator, r=oli-obk
Add Terminator conversion from MIR to SMIR, part #1

This adds internal MIR TerminatorKind to SMIR Terminator conversion.

r? ```@oli-obk```
2023-05-06 13:30:03 +02:00
Chris Denton
f9b3d6a525
Generate windows-sys bindings 2023-05-05 20:48:16 +01:00
Philipp Krones
b53c1bb270
Update Cargo.lock 2023-05-05 17:46:00 +02:00
Santiago Pastorino
4b85bea4ae
Add Assert terminator to SMIR 2023-05-05 10:34:52 -03:00
Ralf Jung
cdd67edce6 bump rustc-build-sysroot to fix miri sysroot build 2023-05-05 08:44:20 +02:00
Matthias Krüger
0098cd4e83
Rollup merge of #108865 - Zoxc:library-dummy-crate, r=jyn514
Add a `sysroot` crate to represent the standard library crates

This adds a dummy crate named `sysroot` to represent the standard library target instead of using the `test` crate. This allows the removal of `proc_macro` as a dependency of `test` allowing these 2 crates to build in parallel saving around 9 seconds locally.
2023-05-04 19:18:17 +02:00
Matthias Krüger
6387eda3ba
Rollup merge of #111027 - clubby789:query-instability-builtin-macros, r=petrochenkov
Remove `allow(rustc::potential_query_instability)` for `builtin_macros`

cc #84447
2023-05-04 08:09:05 +02:00
Manish Goregaokar
8a0e4bebd3
Rollup merge of #111104 - Manishearth:icuup, r=compiler-errors
Update ICU4X to 1.2

Was released a couple weeks ago.

Also needed to make progress on https://github.com/rust-lang/rust/issues/109302 (though this PR does not achieve that part just yet)
2023-05-03 16:42:50 -07:00
Dylan DPC
887dffc447
Rollup merge of #111086 - nnethercote:rm-MemEncoder, r=cjgillot
Remove `MemEncoder`

`MemEncoder` only has one non-test use, and `FileEncoder` would be more appropriate there anyway.

r? ``@cjgillot``
2023-05-04 00:17:26 +05:30
Dylan DPC
32f3ddb902
Rollup merge of #110436 - Mark-Simulacrum:support-xz-version, r=pietroalbini
Support loading version information from xz tarballs

This is intended to allow us to move recompression from xz (produced in CI) to gz after an initial manifest run, which produces a list of actually required artifacts. The rest are then deleted, which means that we can avoid recompressing them, saving a bunch of time.

This is essentially untested and more might be needed, will run a patched promote-release against try artifacts from this PR. If we do go ahead with this we'll either need to backport this patch to beta/stable, wait for it to propagate, or temporarily recompress to gzip but not xz tarballs (or similar).

r? `@pietroalbini`
2023-05-04 00:17:23 +05:30
Manish Goregaokar
522eeba412 Update ICU4X to 1.2 2023-05-02 10:45:16 -07:00
clubby789
e3e93f2867 Use GrowableBitSet to store positional indexes in asm! 2023-05-02 16:42:36 +01:00
clubby789
d5bc581f5d Migrate mir_transform to translatable diagnostics 2023-05-02 16:24:18 +01:00
Nicholas Nethercote
ebee3f8515 Remove MemEncoder.
It's only used in tests. Which is bad, because it means that
`FileEncoder` is used in the compiler but isn't used in tests!

`tests/opaque.rs` now tests encoding/decoding round-trips via file.
Because this is slower than memory, this commit also adjusts the
`u16`/`i16` tests so they are more like the `u32`/`i32` tests, i.e. they
don't test every possible value.
2023-05-02 12:02:32 +10:00
bors
b7d8c88b64 Auto merge of #111036 - RalfJung:miri, r=RalfJung
update Miri

r? `@ghost`
2023-05-01 11:13:49 +00:00
Ralf Jung
f4acc67434 update lockfile 2023-04-30 22:47:51 +02:00
bors
d3edfd18c7 Auto merge of #111001 - matthiaskrgr:rollup-u590scu, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #110586 (Fix Unreadable non-UTF-8 output on localized MSVC)
 - #110652 (Add test for warning-free builds of `core` under `no_global_oom_handling`)
 - #110973 (improve error notes for packed struct reference diagnostic)
 - #110981 (Move most rustdoc-ui tests into subdirectories)
 - #110983 (rustdoc: Get `repr` information through `AdtDef` for foreign items)
 - #110984 (Do not resolve anonymous lifetimes in consts to be static.)
 - #110997 (Improve internal field comments on `slice::Iter(Mut)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-30 00:31:02 +00:00
Matthias Krüger
734e866e63
Rollup merge of #110586 - ChrisDenton:msvc-oem-output, r=workingjubilee
Fix Unreadable non-UTF-8 output on localized MSVC

Fixes #35785 by converting non UTF-8 linker output to Unicode using the OEM code page.

Before:

```text
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: cannot open input file \'m\x84rchenhaft.obj\'\r\n
```

After:

```text
   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'
```

The difference is more dramatic if using a non-ascii language pack for Windows.
2023-04-30 01:14:55 +02:00
bors
f5adff6bd8 Auto merge of #109611 - Zoxc:query-engine-rem, r=cjgillot
Remove `QueryEngine` trait

This removes the `QueryEngine` trait and `Queries` from `rustc_query_impl` and replaced them with function pointers and fields in `QuerySystem`. As a side effect `OnDiskCache` is moved back into `rustc_middle` and the `OnDiskCache` trait is also removed.

This has a couple of benefits.
- `TyCtxt` is used in the query system instead of the removed `QueryCtxt` which is larger.
- Function pointers are more flexible to work with. A variant of https://github.com/rust-lang/rust/pull/107802 is included which avoids the double indirection. For https://github.com/rust-lang/rust/pull/108938 we can name entry point `__rust_end_short_backtrace` to avoid some overhead. For https://github.com/rust-lang/rust/pull/108062 it avoids the duplicate `QueryEngine` structs.
- `QueryContext` now implements `DepContext` which avoids many `dep_context()` calls in `rustc_query_system`.
- The `rustc_driver` size is reduced by 0.33%, hopefully that means some bootstrap improvements.
- This avoids the unsafe code around the `QueryEngine` trait.

r? `@cjgillot`
2023-04-29 21:58:13 +00:00
Matthias Krüger
cdcec39be6
Rollup merge of #110951 - mixi:libressl-3.7.x, r=Mark-Simulacrum
Add support for LibreSSL 3.7.x

This updates the `openssl-sys` crate to 0.9.87 to support building the toolchain against the system libraries provided by LibreSSL version 3.7.x.

LibreSSL 3.7.x has been supported since `openssl-sys` version 0.9.85.
2023-04-29 15:51:16 +02:00
Johannes Nixdorf
21ae5bd5c0 Add support for LibreSSL 3.7.x
This updates the `openssl-sys` crate to 0.9.87 to support building the
toolchain against the system libraries provided by LibreSSL version 3.7.x.

LibreSSL 3.7.x has been supported since `openssl-sys` version 0.9.85.
2023-04-28 16:29:14 +02:00
WANG Rui
c7b7248a60 Bump libffi-sys to 2.3.0 2023-04-27 19:42:52 +08:00
Chris Denton
73b65746e8
Fix Unreadable non-UTF-8 output on localized MSVC
Fixes #35785 by converting non UTF-8 linker output to Unicode using the OEM code page.

Before:

```text
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: cannot open input file \'m\x84rchenhaft.obj\'\r\n
```

After:

```text
   = note: LINK : fatal error LNK1181: cannot open input file 'märchenhaft.obj'

```

The difference is more dramatic if using a non-ascii language pack for Visual Studio.
2023-04-27 09:58:18 +01:00
bors
e3ccd4b9a5 Auto merge of #110562 - ComputerDruid:riscv, r=tmandry
Add definitions for riscv64gc-unknown-fuchsia

To compile, also requires a libc update with https://github.com/rust-lang/libc/pull/3204
2023-04-27 01:29:50 +00:00
John Kåre Alsaker
66d85438ca Remove QueryEngine trait 2023-04-26 07:46:13 +02:00
Dan Johnson
e7ed5ba773 Add definitions for riscv64gc-unknown-fuchsia 2023-04-25 16:42:59 -07:00
bors
666fee2a5f Auto merge of #110518 - loongarch-rs:update-linux-raw-sys, r=Mark-Simulacrum
Update linux-raw-sys to 0.3.4

To support LoongArch.

Changes:
```
Updating errno v0.2.8 -> v0.3.1
Updating is-terminal v0.4.4 -> v0.4.7
Updating linux-raw-sys v0.1.4 -> v0.3.4
Updating rustix v0.36.5 -> v0.37.7
Updating terminal_size v0.2.3 -> v0.2.6
  Adding windows-sys v0.48.0
```

The changes are generated by:

```bash
cargo update -p is-terminal -p terminal_size
```
2023-04-25 15:56:58 +00:00
John Kåre Alsaker
fd4c81f4c1 Add a sysroot crate to represent the standard library crates 2023-04-25 13:40:36 +02:00
bors
f5559e3382 Auto merge of #110718 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`

A few days late, I was on a business trip, sorry.
2023-04-24 21:25:56 +00:00
Yuki Okushi
a373623d55
Rollup merge of #110681 - klensy:cut-dep, r=lcnr
drop few unused crates, gate libc under unix for rustc_codegen_ssa

Small cleanup.
2023-04-25 02:33:29 +09:00
Philipp Krones
fffef0f1d1
Update Cargo.lock 2023-04-23 13:29:28 +02:00
WANG Rui
7aa257f0ab Update dependencies
To support LoongArch.

Changes:
  Updating errno v0.2.8 -> v0.3.1
  Updating is-terminal v0.4.4 -> v0.4.7
  Updating linux-raw-sys v0.1.4 -> v0.3.4
  Updating rustix v0.36.5 -> v0.37.7
  Updating terminal_size v0.2.3 -> v0.2.6
    Adding windows-sys v0.48.0

The changes are generated by:

  cargo update -p is-terminal -p terminal_size
2023-04-23 15:58:38 +08:00
bors
61de794664 Auto merge of #110186 - Nilstrieb:update-time, r=Mark-Simulacrum
Update chrono/spdx-rs/time

This gets rid of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26235
2023-04-23 04:48:43 +00:00
clubby789
da5d01d53d Remove unused synstructure dep 2023-04-22 22:03:33 +01:00
nils
f77541adb6 Update chrono/spdx-rs
This gets rid of https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26235
2023-04-22 22:48:15 +02:00
klensy
3338ee3ca7 drop unused deps, gate libc under unix for one crate 2023-04-22 15:22:21 +03:00
bors
39c6804b92 Auto merge of #106704 - ecnelises:big_archive, r=bjorn3
Support AIX-style archive type

Reading facility of AIX big archive has been supported by `object` since 0.30.0.

Writing facility of AIX big archive has already been supported by `ar_archive_writer`, but we need to bump the version to support the new archive type enum.
2023-04-19 21:21:17 +00:00
Qiu Chaofan
7c8c9cf470 Bump version of object and related crates 2023-04-19 12:42:20 +08:00
Nilstrieb
b5d3d970fa Add rustc_fluent_macro to decouple fluent from rustc_macros
Fluent, with all the icu4x it brings in, takes quite some time to
compile. `fluent_messages!` is only needed in further downstream rustc
crates, but is blocking more upstream crates like `rustc_index`. By
splitting it out, we allow `rustc_macros` to be compiled earlier, which
speeds up `x check compiler` by about 5 seconds (and even more after the
needless dependency on `serde_json` is removed from
`rustc_data_structures`).
2023-04-18 18:56:22 +00:00
Matthias Krüger
41ae7fcf9b
Rollup merge of #110409 - Nilstrieb:some-manual-javascript-object-notationing, r=fee1-dead
Don't use `serde_json` to serialize a simple JSON object

This avoids `rustc_data_structures` depending on `serde_json` which allows it to be compiled much earlier, unlocking most of rustc.

This used to not matter, but after #110407 we're not blocked on fluent anymore, which means that it's now a blocking edge.
![image](https://user-images.githubusercontent.com/48135649/232313178-e0150420-3020-4eb6-98d3-fe5294a8f947.png)

This saves a few more seconds.

cc ````@Zoxc```` who added it recently
2023-04-18 06:44:46 +02:00
Mark Rousskov
e40a4461ea Support loading version information from xz tarballs 2023-04-16 21:29:49 -04:00