about summary refs log tree commit diff
path: root/src/doc/rustc
AgeCommit message (Collapse)AuthorLines
2021-03-27Update rustup cross-compilation docs linkJon Jensen-1/+1
2021-03-10Rollup merge of #82733 - Yn0ga:master, r=estebankYuki Okushi-0/+1
Add powerpc-unknown-openbsd target
2021-03-04Add powerpc-unknown-openbsd targetyn0ga-0/+1
Add powerpc-unknown-openbsd target * Fix missing abi::endian crate * Missing platform-support.md
2021-03-01Change built-in kernel targets to be os = none throughoutJohn Ericson-2/+2
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-01Update supported platforms docJakub Kulik-2/+2
2021-02-28Auto merge of #82350 - ehuss:test-chapter, r=jyn514bors-1/+287
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-27Remove the x86_64-rumprun-netbsd targetSimonas Kazlauskas-1/+0
Closes #81514
2021-02-23Rollup merge of #82166 - kaniini:s390x-musl-target, r=nagisaDylan DPC-0/+1
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-22Update for review comments.Eric Huss-9/+10
2021-02-21Rollup merge of #81966 - deg4uss3r:degausser/aarch64_apple_ios_sim, r=shepmasterYuki Okushi-0/+1
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-20Add a chapter on the test harness.Eric Huss-1/+286
2021-02-20iOS simulator: pick the target based on the environment variableJan-Erik Rediger-1/+1
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-19Fix minor mistake in LTO docs.Eric Huss-3/+3
`-C lto=true` isn't a valid option.
2021-02-19added aarch64_apple_ios_sim as a rustc targetRicky (deg4uss3r)-0/+1
2021-02-19remove checkboxes from s390x-unknown-linux-musl tripletAriadne Conill-1/+1
2021-02-19add s390x-unknown-linux-musl target to platform supportAriadne Conill-0/+1
2021-02-16Add riscv32 and riscv64 musl to supported platform targetsKhem Raj-0/+2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-14Update link for extern prelude.Eric Huss-1/+1
2021-02-04tidy: Run tidy style against markdown files.Eric Huss-6/+6
2021-02-02Rollup merge of #81455 - Amanieu:aarch64_ilp32, r=sanxiynJack Huey-0/+3
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-01-28rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`Alex Crichton-1/+29
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-27Add new aarch64 targets to platform-support.mdAmanieu d'Antras-0/+3
2020-12-28Rollup merge of #80393 - ehuss:doc-git-link, r=jyn514Mara Bos-0/+3
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-26Fix missing deny-by-default.md file.Eric Huss-0/+3
2020-12-26Add links to the source for the rustc and rustdoc books.Eric Huss-0/+3
2020-12-22Revert "Remove missing_fragment_specifier lint"Wesley Wiser-3/+0
This reverts commit 5ba961018c482e050af908de60e4f8bd1a00f0ae.
2020-12-01Rollup merge of #79573 - he32:master, r=jonas-schievinkMara Bos-4/+4
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-11-30Update with status for various NetBSD ports.Havard Eidnes-4/+4
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-30Add built-in support for the armv5te-unknown-linux-uclibceabi targetOndrej Perutka-0/+1
2020-11-26Add to platform-support.mdBenedikt Terhechte-1/+1
2020-11-26Add support for Arm64 Catalyst on ARM MacsBenedikt Terhechte-0/+1
2020-11-24Rollup merge of #76858 - rcvalle:rust-lang-exploit-mitigations, r=steveklabnikJonas Schievink-0/+694
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-23Add exploit mitigations chapter to the rustc bookRamon de C Valle-0/+694
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-22Drop support for cloudabi targetsLzu Tao-4/+0
2020-11-09Rollup merge of #78746 - pietroalbini:i686-freebsd, r=Mark-SimulacrumDylan DPC-1/+1
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-05doc/rustc: promote aarch64-unknown-linux-gnu to tier 1Pietro Albini-1/+7
This also adds a note about missing stack probes support, per the discussion on RFC 2959.
2020-11-04ci: demote i686-unknown-freebsd to tier 2 compiler targetPietro Albini-1/+1
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-02add mipsel-unknown-none targetStephan-0/+1
2020-10-24Link directly to `#build-std` anchorPhilipp Oppermann-1/+1
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-10-24Link to cargo's `build-std` feature instead of `xargo` in custom target docsPhilipp Oppermann-1/+1
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-14Rollup merge of #77239 - shepmaster:silicon-ci-plus, r=pietroalbiniYuki Okushi-1/+1
Enable building Cargo for aarch64-apple-darwin r? @ghost
2020-10-13aarch64-apple-darwin now includes CargoJake Goulding-1/+1
2020-10-13Auto merge of #76830 - Artoria2e5:tune, r=nagisabors-2/+18
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-12Auto merge of #75914 - arlosi:aarch64-ci, r=pietroalbinibors-1/+1
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-05Pass tune-cpu to LLVMMingye Wang-2/+18
I think this is how it should work...
2020-10-01Move aarch64-apple-darwin to tier 2Jake Goulding-3/+3
Drive-by fixes to update the naming of "OSX" [sic] to "macOS".
2020-09-25Adds a GitHub Actions CI build for aarch64-pc-windows-msvc via ↵Arlo Siemsen-1/+1
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-25Remove note about missing ios/tvos targets in platform docs.Eric Huss-9/+8
I misunderstood how this works, and I have fixed the linux builds to support ios/tvos.
2020-09-16Auto merge of #76420 - Gelbpunkt:aarch64-linux-musl, r=pietroalbinibors-1/+1
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 :smile: 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-15doc: platform-support.md: Move to tier 3Alistair Francis-1/+1
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>