Commit Graph

183 Commits

Author SHA1 Message Date
Yuki Okushi 761a2b389d
Rollup merge of #82733 - Yn0ga:master, r=estebank
Add powerpc-unknown-openbsd target
2021-03-10 08:01:29 +09:00
yn0ga ccca767834 Add powerpc-unknown-openbsd target
Add powerpc-unknown-openbsd target

* Fix missing abi::endian crate
* Missing platform-support.md
2021-03-04 22:43:34 +01:00
John Ericson 9d25ccf0e8 Change built-in kernel targets to be os = none throughout
Whether for Rust's own `target_os`, LLVM's triples, or GNU config's, the
OS-related have fields have been for code running *on* that OS, not code
that is *part* of the OS.

The difference is huge, as syscall interfaces are nothing like
freestanding interfaces. Kernels are (hypervisors and other more exotic
situations aside) freestanding programs that use the interfaces provided
by the hardware. It's *those* interfaces, the ones external to the
program being built and its software dependencies, that are the content
of the target.

For the Linux Kernel in particular, `target_env: "gnu"` is removed for
the same reason: that `-gnu` refers to glibc or GNU/linux, neither of
which applies to the kernel itself.

Relates to #74247

Thanks @ojeda for catching some things.
2021-03-01 12:46:25 -05:00
Jakub Kulik c3226accbe Update supported platforms doc 2021-03-01 15:06:32 +01:00
bors 247337f409 Auto merge of #82350 - ehuss:test-chapter, r=jyn514
Add a chapter on the test harness.

There isn't really any online documentation on the test harness, so this adds a chapter to the rustc book which provides information on how the harness works and details on the command-line options.
2021-02-28 09:18:27 +00:00
Simonas Kazlauskas a757fae245 Remove the x86_64-rumprun-netbsd target
Closes #81514
2021-02-27 17:55:22 +02:00
Dylan DPC 8979fd4237
Rollup merge of #82166 - kaniini:s390x-musl-target, r=nagisa
add s390x-unknown-linux-musl target

This is the first step in bringup for Rust on s390x.

The libc and std crates need modifications as well, but getting this upstream makes that work easier.
2021-02-23 02:51:53 +01:00
Eric Huss 7d99d6d10b Update for review comments. 2021-02-22 13:39:15 -08:00
Yuki Okushi 882fd69b22
Rollup merge of #81966 - deg4uss3r:degausser/aarch64_apple_ios_sim, r=shepmaster
Add new `rustc` target for Arm64 machines that can target the iphonesimulator

This PR lands a new target (`aarch64-apple-ios-sim`) that targets arm64 iphone simulator, previously unreachable from Apple Silicon machines.

resolves #81632

r? `@shepmaster`
2021-02-21 15:26:42 +09:00
Eric Huss 87ac39c800 Add a chapter on the test harness. 2021-02-20 16:12:11 -08:00
Jan-Erik Rediger 8d6ad11ab2
iOS simulator: pick the target based on the environment variable
LLVM picks the right things to put into the compiled object file based
on the target deployment version.
We need to communicate it through the target triple.
Only with that LLVM will use the right commands in the file to make it
look and behave like code compiled for the arm64 iOS simulator target.
2021-02-20 16:45:00 -05:00
Eric Huss bf8563dc9b Fix minor mistake in LTO docs.
`-C lto=true` isn't a valid option.
2021-02-19 19:34:46 -08:00
Ricky (deg4uss3r) f10fbbbd53
added aarch64_apple_ios_sim as a rustc target 2021-02-19 13:17:05 -05:00
Ariadne Conill 62ee3ec7ba remove checkboxes from s390x-unknown-linux-musl triplet 2021-02-19 03:16:34 +00:00
Ariadne Conill 597118baa8 add s390x-unknown-linux-musl target to platform support 2021-02-19 03:15:35 +00:00
Khem Raj 8b38a5020f Add riscv32 and riscv64 musl to supported platform targets
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-16 16:44:39 -08:00
Eric Huss ec77574d13 Update link for extern prelude. 2021-02-14 19:38:40 -08:00
Eric Huss bb22eaf39e tidy: Run tidy style against markdown files. 2021-02-04 09:01:50 -08:00
Jack Huey 399c0a8e52
Rollup merge of #81455 - Amanieu:aarch64_ilp32, r=sanxiyn
Add AArch64 big-endian and ILP32 targets

This PR adds 3 new AArch64 targets:
- `aarch64_be-unknown-linux-gnu`
- `aarch64-unknown-linux-gnu_ilp32`
- `aarch64_be-unknown-linux-gnu_ilp32`

It also fixes some ABI issues on big-endian ARM and AArch64.
2021-02-02 16:01:35 -05:00
Alex Crichton a124043fb0 rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`
This commit adds a new stable codegen option to rustc,
`-Csplit-debuginfo`. The old `-Zrun-dsymutil` flag is deleted and now
subsumed by this stable flag. Additionally `-Zsplit-dwarf` is also
subsumed by this flag but still requires `-Zunstable-options` to
actually activate. The `-Csplit-debuginfo` flag takes one of
three values:

* `off` - This indicates that split-debuginfo from the final artifact is
  not desired. This is not supported on Windows and is the default on
  Unix platforms except macOS. On macOS this means that `dsymutil` is
  not executed.

* `packed` - This means that debuginfo is desired in one location
  separate from the main executable. This is the default on Windows
  (`*.pdb`) and macOS (`*.dSYM`). On other Unix platforms this subsumes
  `-Zsplit-dwarf=single` and produces a `*.dwp` file.

* `unpacked` - This means that debuginfo will be roughly equivalent to
  object files, meaning that it's throughout the build directory
  rather than in one location (often the fastest for local development).
  This is not the default on any platform and is not supported on Windows.

Each target can indicate its own default preference for how debuginfo is
handled. Almost all platforms default to `off` except for Windows and
macOS which default to `packed` for historical reasons.

Some equivalencies for previous unstable flags with the new flags are:

* `-Zrun-dsymutil=yes` -> `-Csplit-debuginfo=packed`
* `-Zrun-dsymutil=no` -> `-Csplit-debuginfo=unpacked`
* `-Zsplit-dwarf=single` -> `-Csplit-debuginfo=packed`
* `-Zsplit-dwarf=split` -> `-Csplit-debuginfo=unpacked`

Note that `-Csplit-debuginfo` still requires `-Zunstable-options` for
non-macOS platforms since split-dwarf support was *just* implemented in
rustc.

There's some more rationale listed on #79361, but the main gist of the
motivation for this commit is that `dsymutil` can take quite a long time
to execute in debug builds and provides little benefit. This means that
incremental compile times appear that much worse on macOS because the
compiler is constantly running `dsymutil` over every single binary it
produces during `cargo build` (even build scripts!). Ideally rustc would
switch to not running `dsymutil` by default, but that's a problem left
to get tackled another day.

Closes #79361
2021-01-28 08:51:11 -08:00
Amanieu d'Antras 69e6326564 Add new aarch64 targets to platform-support.md 2021-01-27 23:08:54 +00:00
Mara Bos bae6475443
Rollup merge of #80393 - ehuss:doc-git-link, r=jyn514
Add links to the source for the rustc and rustdoc books.

This adds a little icon in the upper-right corner of the books so that readers can find the source if they want to make changes or file issues. This is already included in several of the other books.
2020-12-28 19:09:22 +00:00
Eric Huss 6dab9265c8 Fix missing deny-by-default.md file. 2020-12-26 13:53:10 -08:00
Eric Huss 142764f79e Add links to the source for the rustc and rustdoc books. 2020-12-26 13:22:33 -08:00
Wesley Wiser 9414f0b833 Revert "Remove missing_fragment_specifier lint"
This reverts commit 5ba961018c.
2020-12-22 08:35:52 -05:00
Mara Bos 2891f3ff3d
Rollup merge of #79573 - he32:master, r=jonas-schievink
Update with status for various NetBSD ports.

The NetBSD ports of rust to aarch64, armv7*, i686, and powerpc**
all both build and run.  Status is as of rust 1.47.0.

*) Natively requires repeated successive build attempts (`rustc` is
   such a resource pig VM-consumption-wise), or run in a chroot
   on an aarch64 host where the available VM space is 4GB instead
   of the native 2GB.
**) Powerpc either requires `-latomic` in a directory searched by
   default by `ld` or to be built within pkgsrc which has a patch and
   support package to tackle this issue.
2020-12-01 10:50:25 +00:00
Havard Eidnes 1c367c0a70 Update with status for various NetBSD ports.
The NetBSD ports of rust to aarch64, armv7*, i686, and powerpc**
all both build and run.

*) Natively requires repeated successive build attempts (rustc is
   such a resource pig VM-consumption-wise), or run in a chroot
   on an aarch64 host where the available VM space is 4GB instead
   of the native 2GB.
**) Powerpc either requires -latomic in a directory searched by
   default by 'ld' or to be built within pkgsrc which has a patch
   to tackle this.
2020-11-30 19:18:21 +01:00
Ondrej Perutka b2ad73e8a4 Add built-in support for the armv5te-unknown-linux-uclibceabi target 2020-11-30 09:47:09 +01:00
Benedikt Terhechte 836d43933d Add to platform-support.md 2020-11-26 11:33:38 +01:00
Benedikt Terhechte 96779647c4 Add support for Arm64 Catalyst on ARM Macs 2020-11-26 11:31:59 +01:00
Jonas Schievink 8fde4be7d0
Rollup merge of #76858 - rcvalle:rust-lang-exploit-mitigations, r=steveklabnik
Add exploit mitigations chapter to the rustc book

This section documents the exploit mitigations applicable to the Rust compiler when building programs for the Linux operating system on the AMD64 architecture and equivalent. This was done for a project I'm currently working on, and I hope it'll also be helpful to others.
2020-11-24 13:17:28 +01:00
Ramon de C Valle 5b1cb0eb8a Add exploit mitigations chapter to the rustc book
This section documents the exploit mitigations applicable to the Rust
compiler when building programs for the Linux operating system on the
AMD64 architecture and equivalent.
2020-11-23 19:25:59 -08:00
Lzu Tao 6bfe27a3e0 Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
Dylan DPC 4e0695b79f
Rollup merge of #78746 - pietroalbini:i686-freebsd, r=Mark-Simulacrum
Demote i686-unknown-freebsd to tier 2 compiler target

While technically the `i686-unknown-freebsd` target has been a tier 2 development platform for a long time, with full toolchain tarballs available on static.rust-lang.org, due to a bug in the manifest generation the target was never available for download through rustup.

The infrastructure team privately inquired the FreeBSD package maintainers, and they weren't relying on those tarballs either, so it's a fair assumption to say practically nobody is using those tarballs.

This PR then removes the CI builder that produces full tarballs for the target, and moves the compilation of `rust-std` for the target in `dist-various-2`. The `x86_64-unknown-freebsd` target is *not* affected.

cc `@rust-lang/infra` `@rust-lang/compiler` `@rust-lang/release`
r? `@Mark-Simulacrum`
2020-11-09 19:06:57 +01:00
Pietro Albini 1274faed1a
doc/rustc: promote aarch64-unknown-linux-gnu to tier 1
This also adds a note about missing stack probes support, per the
discussion on RFC 2959.
2020-11-05 11:54:30 +01:00
Pietro Albini 53c1eb7a26
ci: demote i686-unknown-freebsd to tier 2 compiler target
While technically the i686-unknown-freebsd target has been a tier 2
development platform for a long time, with full toolchain tarballs
available on static.rust-lang.org, due to a bug in the manifest
generation the target was never available for download through rustup.

The infrastructure team privately inquired the FreeBSD package
maintainers, and they weren't relying on those tarballs either, so it's
a fair assumption to say practically nobody is using those tarballs.

This PR then removes the CI builder that produces full tarballs for the
target, and moves the compilation of rust-std for the target in
dist-various-2.

The x86_64-unknown-freebsd target is *not* affected.
2020-11-04 18:38:49 +01:00
Stephan 5130f2e777 add mipsel-unknown-none target 2020-11-02 23:31:15 +01:00
Philipp Oppermann eb5db6ce4f
Link directly to `#build-std` anchor
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-10-24 16:13:49 +02:00
Philipp Oppermann 11a7087cc1
Link to cargo's `build-std` feature instead of `xargo` in custom target docs
The `xargo` tool is in maintenance mode since 2018 and the `build-std` feature of cargo already works reasonably well for most use cases.
2020-10-24 14:30:45 +02:00
Yuki Okushi 16612a9292
Rollup merge of #77239 - shepmaster:silicon-ci-plus, r=pietroalbini
Enable building Cargo for aarch64-apple-darwin

r? @ghost
2020-10-14 06:02:12 +09:00
Jake Goulding 8b6e3460db aarch64-apple-darwin now includes Cargo 2020-10-13 11:00:03 -04:00
bors f54072bb81 Auto merge of #76830 - Artoria2e5:tune, r=nagisa
Pass tune-cpu to LLVM

I think this is how it should work...

See https://internals.rust-lang.org/t/expose-tune-cpu-from-llvm/13088 for the background. Or the documentation diff.
2020-10-13 02:49:00 +00:00
bors d9b931669b Auto merge of #75914 - arlosi:aarch64-ci, r=pietroalbini
Promote aarch64-pc-windows-msvc to Tier 2 Development Platform

Adds a GitHub Actions CI build for `aarch64-pc-windows-msvc` via cross-compilation on an x86_64 host.

This promotes `aarch64-pc-windows-msvc` from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools).

Fixes #72881

r? `@pietroalbini`
2020-10-12 10:17:48 +00:00
Mingye Wang a35a93f09c Pass tune-cpu to LLVM
I think this is how it should work...
2020-10-05 07:50:44 +08:00
Jake Goulding 2fe271e4c2 Move aarch64-apple-darwin to tier 2
Drive-by fixes to update the naming of "OSX" [sic] to "macOS".
2020-10-01 07:56:30 -04:00
Arlo Siemsen 0a4dc8bc16 Adds a GitHub Actions CI build for aarch64-pc-windows-msvc via cross-compilation on an x86_64 host.
This promotes aarch64-pc-windows-msvc from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools).

Fixes #72881
2020-09-25 15:08:18 -07:00
Eric Huss de725fe56f Remove note about missing ios/tvos targets in platform docs.
I misunderstood how this works, and I have fixed the linux builds
to support ios/tvos.
2020-09-25 12:09:06 -07:00
bors ff806b8716 Auto merge of #76420 - Gelbpunkt:aarch64-linux-musl, r=pietroalbini
Add aarch64-unknown-linux-musl host builds

This adds aarch64-unknown-linux-musl to the hosts list and adds the build to the dist-arm-linux builder as `@Mark-Simulacrum` suggested to me in Zulip. `@jyn514` requested to be mentioned 😄

I had to update the config for crosstool-ng as it had a prompt about the glibc version.

I ran `src/ci/docker/run.sh dist-arm-linux` to test it.

```
Build completed successfully in 1:31:50
Compile requests              8180
Compile requests executed     8135
Cache hits                     287
Cache misses                  7848
Cache timeouts                   0
Cache read errors                0
Forced recaches                  0
Cache write errors               0
Compilation failures             0
Cache errors                     0
Non-cacheable compilations       0
Non-cacheable calls             36
Non-compilation calls            9
Unsupported compiler calls       0
Average cache write          0.000 s
Average cache read miss      6.389 s
Average cache read hit       0.000 s
Cache location             Local disk: "/sccache"
Cache size                     202 MiB
Max cache size                  10 GiB
== clock drift check ==
  local time: Sun Sep  6 19:30:17 UTC 2020
  network time: Sun, 06 Sep 2020 19:30:17 GMT
== end clock drift check ==
```

Only errors were in miri due to struct fields being private (already been reported [here](https://github.com/rust-lang/rust/issues/76337))

Edit: Maybe it is helpful if I add that it is a working compiler
```sh
/rust-nightly-aarch64-unknown-linux-musl # ash install.sh
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rls-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'clippy-preview'
install: installing component 'rustfmt-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'rust-analysis-aarch64-unknown-linux-musl'
install: installing component 'rust-std-aarch64-unknown-linux-musl'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    Rust is ready to roll.

/ # cat test.rs
fn main() { println!("hello world"); }
/ # rustc test.rs
/ # ./test
hello world
 # file test
test: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
```
2020-09-16 17:22:54 +00:00
Alistair Francis e968f86f71 doc: platform-support.md: Move to tier 3
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-15 08:13:01 -07:00
Alistair Francis cbda1546b1 doc: platform-support.md: Document port
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-15 07:58:33 -07:00