forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#133193 - fmease:rollup-v38ayvk, r=fmease
Rollup of 9 pull requests Successful merges: - rust-lang#132758 (Improve `{BTreeMap,HashMap}::get_key_value` docs.) - rust-lang#133180 ([rustdoc] Fix items with generics not having their jump to def link generated) - rust-lang#133181 (Update books) - rust-lang#133182 (const_panic: inline in bootstrap builds to avoid f16/f128 crashes) - rust-lang#133185 (rustdoc-search: use smart binary search in bitmaps) - rust-lang#133186 (Document s390x-unknown-linux targets) - rust-lang#133187 (Add reference annotations for diagnostic attributes) - rust-lang#133191 (rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section.) - rust-lang#133192 (RELEASES.md: Don't document unstable `--test-build-wrapper`) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
45 changed files
with
574 additions
and
212 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Submodule edition-guide
updated
4 files
+23 −2 | .github/workflows/main.yml | |
+1 −0 | src/SUMMARY.md | |
+47 −0 | src/rust-2021/raw-lifetimes.md | |
+6 −5 | src/rust-2021/reserved-syntax.md |
Submodule reference
updated
19 files
+39 −0 | src/attributes.md | |
+63 −3 | src/attributes/codegen.md | |
+22 −0 | src/attributes/debugger.md | |
+9 −1 | src/attributes/derive.md | |
+72 −4 | src/attributes/diagnostics.md | |
+14 −1 | src/attributes/limits.md | |
+25 −4 | src/attributes/testing.md | |
+14 −2 | src/attributes/type_system.md | |
+1 −1 | src/conditional-compilation.md | |
+78 −0 | src/expressions/operator-expr.md | |
+51 −15 | src/inline-assembly.md | |
+2 −2 | src/items/enumerations.md | |
+3 −4 | src/items/generics.md | |
+17 −0 | src/linkage.md | |
+1 −1 | src/macro-ambiguity.md | |
+0 −2 | src/tokens.md | |
+2 −1 | src/trait-bounds.md | |
+3 −2 | src/type-layout.md | |
+1 −1 | src/types/trait-object.md |
Submodule rustc-dev-guide
updated
10 files
+1 −0 | src/SUMMARY.md | |
+2 −0 | src/building/suggested.md | |
+2 −0 | src/diagnostics.md | |
+1 −1 | src/llvm-coverage-instrumentation.md | |
+71 −51 | src/parallel-rustc.md | |
+2 −3 | src/stability.md | |
+11 −0 | src/tests/compiletest.md | |
+12 −1 | src/tests/directives.md | |
+4 −0 | src/tests/intro.md | |
+40 −0 | src/tests/misc.md |
This file contains 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
This file contains 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
113 changes: 113 additions & 0 deletions
113
src/doc/rustc/src/platform-support/s390x-unknown-linux-gnu.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# `s390x-unknown-linux-gnu` | ||
|
||
**Tier: 2 (with Host Tools)** | ||
|
||
IBM z/Architecture (s390x) targets (including IBM Z and LinuxONE) running Linux. | ||
|
||
## Target maintainers | ||
|
||
- Ulrich Weigand, <[email protected]>, [@uweigand](https://github.com/uweigand) | ||
- Josh Stone, <[email protected]>, [@cuviper](https://github.com/cuviper) | ||
|
||
## Requirements | ||
|
||
This target requires: | ||
|
||
* Linux Kernel version 3.2 or later | ||
* glibc 2.17 or later | ||
|
||
Code generated by the target uses the z/Architecture ISA assuming a minimum | ||
architecture level of z10 (Eighth Edition of the z/Architecture Principles | ||
of Operation), and is compliant with the s390x ELF ABI. | ||
|
||
Reference material: | ||
|
||
* [z/Architecture Principles of Operation][s390x-isa] | ||
* [z/Architecture ELF Application Binary Interface][s390x-abi] | ||
|
||
[s390x-isa]: https://publibfp.dhe.ibm.com/epubs/pdf/a227832d.pdf | ||
[s390x-abi]: https://github.com/IBM/s390x-abi | ||
|
||
## Building the target | ||
|
||
This target is distributed through `rustup`, and otherwise requires no | ||
special configuration. | ||
|
||
If you need to build your own Rust for some reason though, the target can be | ||
enabled in `config.toml`. For example: | ||
|
||
```toml | ||
[build] | ||
target = ["s390x-unknown-linux-gnu"] | ||
``` | ||
|
||
## Building Rust programs | ||
|
||
On a s390x Linux host, the `s390x-unknown-linux-gnu` target should be | ||
automatically installed and used by default. | ||
|
||
On a non-s390x host, add the target: | ||
|
||
```bash | ||
rustup target add s390x-unknown-linux-gnu | ||
``` | ||
|
||
Then cross compile crates with: | ||
|
||
```bash | ||
cargo build --target s390x-unknown-linux-gnu | ||
``` | ||
|
||
## Testing | ||
|
||
There are no special requirements for testing and running the target. | ||
For testing cross builds on the host, please refer to the "Cross-compilation | ||
toolchains and C code" section below. | ||
|
||
## Cross-compilation toolchains and C code | ||
|
||
Rust code built using the target is compatible with C code compiled with | ||
GCC or Clang using the `s390x-unknown-linux-gnu` target triple (via either | ||
native or cross-compilation). | ||
|
||
On Ubuntu, a s390x cross-toolchain can be installed with: | ||
|
||
```bash | ||
apt install gcc-s390x-linux-gnu g++-s390x-linux-gnu libc6-dev-s390x-cross | ||
``` | ||
|
||
Depending on your system, you may need to configure the target to use the GNU | ||
GCC linker. To use it, add the following to your `.cargo/config.toml`: | ||
|
||
```toml | ||
[target.s390x-unknown-linux-gnu] | ||
linker = "s390x-linux-gnu-gcc" | ||
``` | ||
|
||
If your `s390x-linux-gnu-*` toolchain is not in your `PATH` you may need to | ||
configure additional settings: | ||
|
||
```toml | ||
[target.s390x-unknown-linux-gnu] | ||
# Adjust the paths to point at your toolchain | ||
cc = "/TOOLCHAIN_PATH/bin/s390x-linux-gnu-gcc" | ||
cxx = "/TOOLCHAIN_PATH/bin/s390x-linux-gnu-g++" | ||
ar = "/TOOLCHAIN_PATH/bin/s390x-linux-gnu-ar" | ||
ranlib = "/TOOLCHAIN_PATH/bin/s390x-linux-gnu-ranlib" | ||
linker = "/TOOLCHAIN_PATH/bin/s390x-linux-gnu-gcc" | ||
``` | ||
|
||
To test cross compiled binaries on a non-s390x host, you can use | ||
[`qemu`](https://www.qemu.org/docs/master/system/target-s390x.html). | ||
On Ubuntu, a s390x emulator can be obtained with: | ||
|
||
```bash | ||
apt install qemu-system-s390x | ||
``` | ||
|
||
Then, in `.cargo/config.toml` set the `runner`: | ||
|
||
```toml | ||
[target.s390x-unknown-linux-gnu] | ||
runner = "qemu-s390x-static -L /usr/s390x-linux-gnu" | ||
``` |
83 changes: 83 additions & 0 deletions
83
src/doc/rustc/src/platform-support/s390x-unknown-linux-musl.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# `s390x-unknown-linux-musl` | ||
|
||
**Tier: 3** | ||
|
||
IBM z/Architecture (s390x) targets (including IBM Z and LinuxONE) running Linux. | ||
|
||
## Target maintainers | ||
|
||
- Ulrich Weigand, <[email protected]>, [@uweigand](https://github.com/uweigand) | ||
|
||
## Requirements | ||
|
||
This target requires: | ||
|
||
* Linux Kernel version 3.2 or later | ||
* musl 1.2.3 or later | ||
|
||
Code generated by the target uses the z/Architecture ISA assuming a minimum | ||
architecture level of z10 (Eighth Edition of the z/Architecture Principles | ||
of Operation), and is compliant with the s390x ELF ABI. | ||
|
||
Reference material: | ||
|
||
* [z/Architecture Principles of Operation][s390x-isa] | ||
* [z/Architecture ELF Application Binary Interface][s390x-abi] | ||
|
||
[s390x-isa]: https://publibfp.dhe.ibm.com/epubs/pdf/a227832d.pdf | ||
[s390x-abi]: https://github.com/IBM/s390x-abi | ||
|
||
## Building the target | ||
|
||
Because it is Tier 3, Rust does not yet ship pre-compiled artifacts for this | ||
target. | ||
|
||
Therefore, you can build Rust with support for the target by adding it to the | ||
target list in `config.toml`, a sample configuration is shown below. | ||
|
||
```toml | ||
[build] | ||
target = ["s390x-unknown-linux-musl"] | ||
``` | ||
|
||
## Building Rust programs | ||
|
||
Rust does not yet ship pre-compiled artifacts for this target. To compile for | ||
this target, you will first need to build Rust with the target enabled (see | ||
"Building the target" above). | ||
|
||
## Testing | ||
|
||
There are no special requirements for testing and running the target. | ||
For testing cross builds on the host, please refer to the "Cross-compilation | ||
toolchains and C code" section below. | ||
|
||
## Cross-compilation toolchains and C code | ||
|
||
Rust code built using the target is compatible with C code compiled with | ||
GCC or Clang using the `s390x-unknown-linux-musl` target triple (via either | ||
native or cross-compilation). | ||
|
||
Depending on your system, you may need to configure the target to use the GNU | ||
GCC linker. To use it, add the following to your `.cargo/config.toml`: | ||
|
||
```toml | ||
[target.s390x-unknown-linux-musl] | ||
linker = "s390x-linux-musl-gcc" | ||
``` | ||
|
||
If your `s390x-linux-musl-*` toolchain is not in your `PATH` you may need to | ||
configure additional settings: | ||
|
||
```toml | ||
[target.s390x-unknown-linux-musl] | ||
# Adjust the paths to point at your toolchain | ||
cc = "/TOOLCHAIN_PATH/bin/s390x-linux-musl-gcc" | ||
cxx = "/TOOLCHAIN_PATH/bin/s390x-linux-musl-g++" | ||
ar = "/TOOLCHAIN_PATH/bin/s390x-linux-musl-ar" | ||
ranlib = "/TOOLCHAIN_PATH/bin/s390x-linux-musl-ranlib" | ||
linker = "/TOOLCHAIN_PATH/bin/s390x-linux-musl-gcc" | ||
``` | ||
|
||
To test cross compiled binaries on a non-s390x host, you can use | ||
[`qemu`](https://www.qemu.org/docs/master/system/target-s390x.html). |
Oops, something went wrong.