about summary refs log tree commit diff
path: root/src/doc/rustc
AgeCommit message (Collapse)AuthorLines
2024-06-04Rollup merge of #125944 - P1n3appl3:fuchsia, r=lqdGuillaume Gomez-2/+2
Update fuchsia maintainers This makes the maintainers list in the docs line up with the current [fuchsia team](https://github.com/rust-lang/team/blob/master/teams/fuchsia.toml).
2024-06-04Rollup merge of #125690 - Lokathor:arm-maintainer-reorg, r=ehuss许杰友 Jieyou Xu (Joe)-32/+35
ARM Target Docs Update Updates the ARM target docs, drawing more attention to the `arm-none-eabi` target group by placing all targets *within* that group as a sub-list in the Table of Contents. Also updates the `armv4t-none-eabi` page (maintainer signoff: I'm that target's maintainer) to clarify that the page covers the arm version and the thumb version of the target, but that the target group page has the full info because there's nothing really specific to say for those targets.
2024-06-04Auto merge of #122597 - pacak:master, r=bjorn3bors-1/+7
Show files produced by `--emit foo` in json artifact notifications Right now it is possible to ask `rustc` to save some intermediate representation into one or more files with `--emit=foo`, but figuring out what exactly was produced is difficult. This pull request adds information about `llvm_ir` and `asm` intermediate files into notifications produced by `--json=artifacts`. Related discussion: https://internals.rust-lang.org/t/easier-access-to-files-generated-by-emit-foo/20477 Motivation - `cargo-show-asm` parses those intermediate files and presents them in a user friendly way, but right now I have to apply some dirty hacks. Hacks make behavior confusing: https://github.com/hintron/computer-enhance/issues/35 This pull request introduces a new behavior: now `rustc` will emit a new artifact notification for every artifact type user asked to `--emit`, for example for `--emit asm` those will include all the `.s` files. Most users won't notice this behavior, to be affected by it all of the following must hold: - user must use `rustc` binary directly (when `cargo` invokes `rustc` - it consumes artifact notifications and doesn't emit anything) - user must specify both `--emit xxx` and `--json artifacts` - user must refuse to handle unknown artifact types - user must disable incremental compilation (or deal with it better than cargo does, or use a workaround like `save-temps`) in order not to hit #88829 / #89149
2024-06-03Update fuchsia maintainersJulia Ryan-2/+2
2024-05-30The modern styling is apparently to use Title Case for the chip/company, "Arm".Lokathor-22/+22
2024-05-29tier 3 target policy: clarify the point about producing assemblyRalf Jung-1/+2
2024-05-28delete the offending single space.Lokathor-1/+1
2024-05-28It's spelled "ARM", in all caps.Lokathor-22/+22
2024-05-28update armv4t docsLokathor-12/+9
2024-05-28make the fact that arm-none-eabi is a group of targets the first thing you ↵Lokathor-10/+16
see on the page.
2024-05-28Reorder the TOC so that targets are put under their meta-groupLokathor-9/+9
2024-05-22Remove unnecessary `.md` from the documentation sidebarMads Marquart-2/+2
2024-05-21Rollup merge of #124772 - madsmtm:apple-platform-support-docs, r=oli-obkMatthias Krüger-177/+371
Refactor documentation for Apple targets Refactor the documentation for Apple targets in `rustc`'s platform support page to make it clear what the supported OS version is and which environment variables are being read (`*_DEPLOYMENT_TARGET` and `SDKROOT`). This fixes https://github.com/rust-lang/rust/issues/124215. Note that I've expanded the `aarch64-apple-ios-sim` maintainers `@badboy` and `@deg4uss3r` to include being maintainer of all `*-apple-ios-*` targets. If you do not wish to be so, please state that, then I'll explicitly note that in the docs. Additionally, I've added myself as co-maintainer of most of these targets. r? `@thomcc` I think the documentation you've previously written on tvOS is great, have mostly modified it to have a more consistent formatting with the rest of the Apple target. I recognize that there's quite a few changes here, feel free to ask about any of them! --- CC `@simlay` `@Nilstrieb` `@rustbot` label O-apple
2024-05-19Add Cargo specific doc regarding his interaction with `--check-cfg`Urgau-1/+75
2024-05-16Rollup merge of #125018 - sagudev:patch-2, r=AmanieuMatthias Krüger-1/+2
Update linker-plugin-lto.md to include LLVM 18 I did this manually not via provided script.
2024-05-14Auto merge of #123816 - tgross35:f16-f128-mangling, r=michaelwoeristerbors-0/+2
Add v0 symbol mangling for `f16` and `f128` As discussed at <https://github.com/rust-lang/rust/pull/122106>, use the crate encoding to represent new primitives.
2024-05-14Add v0 symbol mangling for `f16` and `f128`Trevor Gross-0/+2
As discussed at <https://github.com/rust-lang/rust/pull/122106>, use the crate encoding to represent new primitives.
2024-05-14Auto merge of #125023 - morr0ne:linux-none-target, r=Nilstriebbors-0/+42
Add x86_64-unknown-linux-none target Adds a freestanding linux binary with no libc dependency. This is useful for writing programs written only in rust. It is also essential for writing low level stuff like libc or a dynamic linker. Tier 3 policy: >A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) I will be the designed maintainer for this target >Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. The target triple is consistent with other targets >Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. There is no confusion with other targets since it explicitly adds "none" at the end instead of omitting the environment >Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. The target does not introduce any unusual requirement >The target must not introduce license incompatibilities. There are no license incompatibilities > Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). Everything added is under that license >The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. There are no new dependencies >Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. There is no proprietary dependencies >"onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. No such terms exist for this target >Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. >This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. Understood >Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. The target already implements core. It might be possible in the future to add support for alloc and std by leveraging crates such as [origin](https://github.com/sunfishcode/origin/) and [rustix](https://github.com/bytecodealliance/rustix) > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. I believe the proper docs are added >Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via `@)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. Understood > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. No other targets are effected >Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target. The same backends used by other linux targets work without issues
2024-05-14fix typo in x86_64-unknown-linux-none docsFederico Maria Morrone-1/+1
Co-authored-by: Trevor Gross <t.gross35@gmail.com>
2024-05-13Migrate fuchsia docs from `pm` to `ffx`Erick Tryzelaar-14/+11
The `pm` tool has been deprecated, so this migrates the fuchsia documentation to the new `ffx` based tooling.
2024-05-12docs: fix typo in platform-support docsFederico Maria Morrone-1/+1
2024-05-11docs: Document x86_64-unknown-linux-none targetFederico Maria Morrone-0/+42
2024-05-11Update linker-plugin-lto.md to include LLVM 18Samson-1/+2
2024-05-07Fuchsia test runner: fixup scriptMarc Khouri-6/+18
This commit fixes several issues in the fuchsia-test-runner.py script: 1. Migrate from `pm` to `ffx` for package management, as `pm` is now deprecated. Furthermore, the `pm` calls used in this script no longer work at Fuchsia's HEAD. This is the largest change in this commit, and impacts all steps around repository management (creation and registration of the repo, as well as package publishing). 2. Allow for `libtest` to be either statically or dynamically linked. The script assumed it was dynamically linked, but the current Rust behavior at HEAD is to statically link it. 3. Minor cleanup to use `ffx --machine json` rather than string parsing. 4. Minor cleanup to the docs around the script.
2024-05-06Auto merge of #124209 - Urgau:check-cfg-more-friendly-docs, r=ehussbors-62/+97
Make check-cfg docs more user-friendly This PR improves the `--check-cfg` to make them more user-friendly by: - explaining the purpose of the feature - removing the "form" jargon - making it (bit) less formal and more "friendly" - making the doc less cluttered - and by fixing (the width and flags) of the examples `@rustbot` label +F-check-cfg
2024-05-06Make check-cfg docs more user-friendlyUrgau-62/+97
2024-05-05Document all Apple targets in rustc's platform supportMads Marquart-177/+371
- Fixed std support in top-level docs. - Added `*-apple-darwin` docs. - Added `i686-apple-darwin` docs. - Moved `aarch64-apple-ios-sim` to `*-apple-ios` and document all the iOS targets there. - Added `*-apple-ios-macabi` docs. - Add myself (madsmtm) as co-maintainer of most of these targets.
2024-05-05Add `rustfmt` cfg to well known cfgs listUrgau-1/+2
2024-05-04docs(hermit): Explain Hermit's template linkbarrett-1/+1
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2024-05-04fix(docs): Correct Hermit links to loader + 'rusty-demo'Barrett-3/+3
Both are renamed! Sorry for the initial incorrect commit, but this should correct it. 😄
2024-05-04docs(fix): incorrect Hermit links in the rustc bookBarrett-4/+4
the Hermit team seems to have moved from `hermitcore` to `hermit-os` on GitHub. this change corrects the old links on its target page.
2024-05-01Auto merge of #124404 - jonathanpallant:arm-target-changes-new, r=chrisncbors-99/+577
Arm bare-metal target doc changes Updates the Arm bare-metal target docs: * Detailed pages for all the Cortex-M targets, including details about setting target-cpu and target-features to suit specific Arm models * More detail about the difference between `eabi` and `eabihf` * Marks the Embedded Devices Working Group Cortex-M Team as the maintainer of the Cortex-M targets
2024-05-01Auto merge of #121564 - ojeda:rustc-jobserver, r=ehussbors-0/+87
rustc: document the jobserver Explicitly document that the jobserver may be used by `rustc`, as well as recommend the `+` indicator for integration of `rustc` into GNU Make. In particular, show the warning to increase the chances that this document is found when searching for solutions online. In addition, add a note about the issue with GNU Make 4.3 since it is important that users realize they should do this even if they do not expect parallelism from `rustc`. Finally, show how to workaround the issue of `$(shell ...)` calls in recursive Make (which e.g. was needed for the Linux kernel). The GNU Make 4.4 case under `--jobserver-style=pipe` is not added since it got fixed after Rust 1.76.0 already (i.e. `rustc` will not warn if it finds the negative file descriptors). From: https://github.com/rust-lang/rust/issues/120515 Cc: `@petrochenkov` `@belovdv` `@weihanglo` `@bjorn3` --- v2: To be able to use tab characters for the Make examples, add `<!-- ignore-tidy-{check} -->` support to `tidy`. v3: Added "Integration with build systems" section to hold the GNU Make one. Added "by clearing the `MAKEFLAGS` variable". Added "aforementioned" so that it is clear we are talking about the warning above. v4: Added CMake subsection. Added a note that `rustc` may be affected by other flags, e.g. `CARGO_MAKEFLAGS`. v5: Added that `rustc` will choose the number of jobs if a jobserver is not passed.
2024-04-30arm target docs: clarify A32/T32/Arm ISA/Thumb ISA/Thumb-2 ISAJonathan Pallant-15/+36
2024-04-30Recapitalise ARMvX{-Y} to ArmvX{-Y}Jonathan Pallant-81/+81
Yes it looks weird, but this is how Arm write it now. I left ARM64 alone, because it's a Microsoft/Apple term but not an Arm term (they have Armv8-A and Armv9-A architectures, which say that A64 instructions are executed when in the Aarch64 state), and I don't want to get into that, especially for a Tier 1 target.
2024-04-30rustc: document the jobserverMiguel Ojeda-0/+87
Explicitly document that the jobserver may be used by `rustc` and show the warning to increase the chances that this document is found when searching for solutions online. In particular, add a section about the interaction with build systems, which is intended to contain recommendations on how to integrate `rustc` with different built systems. For GNU Make, recommend using the `+` indicator. In addition, add a note about the issue with GNU Make 4.3 since it is important that users realize they should do this even if they do not expect parallelism from `rustc`. Finally, show how to workaround the issue of `$(shell ...)` calls in recursive Make (which e.g. was needed for the Linux kernel). The GNU Make 4.4 case under `--jobserver-style=pipe` is not added since it got fixed after Rust 1.76.0 already (i.e. `rustc` will not warn if it finds the negative file descriptors). For CMake, recommend using `JOB_SERVER_AWARE` and show a workaround using `$(MAKE)` for earlier versions (when using the Makefile generator). From: https://github.com/rust-lang/rust/issues/120515 Cc: @petrochenkov @belovdv @weihanglo @bjorn3 Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-04-29arm target docs: small wording fixesJonathan Pallant-2/+2
2024-04-29coverage: Replace boolean options with a `CoverageLevel` enumZalathar-5/+1
2024-04-29arm target docs: collapsed eabi and eabihf into oneJonathan Pallant-223/+56
2024-04-29Arm target doc wording tweaks based on review comments.Jonathan Pallant-27/+37
2024-04-29Adding new arm target docs to SUMMARY.mdJonathan Pallant-0/+7
2024-04-26Fixed some typographical errors in arm-none-eabi.md.Jonathan Pallant-3/+3
2024-04-26Add pages for every Cortex-M targetJonathan Pallant-39/+646
Now explains how to, for example, support a Cortex-M55 with FPU and Integer Helium.
2024-04-25debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and ↵Vadim Petrochenkov-0/+12
`#[collapse_debuginfo]` `-Z debug-macros` is "stabilized" by enabling it by default and removing. `-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`. It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no. Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local). `#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
2024-04-24chore: fix some typos in commentswhosehang-2/+2
Signed-off-by: whosehang <whosehang@outlook.com>
2024-04-22Auto merge of #115120 - icedrocket:ignore-strip-on-msvc, r=michaelwoeristerbors-15/+16
Ignore `-C strip` on MSVC tl;dr - Define `-Cstrip` to only ever affect the binary; no other build artifacts. This is necessary to improve cross-platform behavior consistency: if someone wanted debug information to be contained only in separate files on all platforms, they would set `-Cstrip=symbols` and `-Csplit-debuginfo=packed`, but this would result in no PDB files on MSVC. Resolves #114215
2024-04-20Auto merge of #121712 - mati865:provide-prebuilt-std-for-gnullvm, ↵bors-14/+28
r=Mark-Simulacrum Provide prebuilt std for gnullvm targets Revival of https://github.com/rust-lang/rust/pull/114346 which waiting on MCP that was accepted recently: https://github.com/rust-lang/compiler-team/issues/710#issuecomment-1942014308
2024-04-19Show files produced by --emit foo in json artifact notificationsMichael Baikov-1/+7
2024-04-19coverage. Add coverage-options=mcdc as gate for MC/DC instrumentzhuyunxing-2/+2
2024-04-18Auto merge of #123144 - dpaoliello:arm64eclib, ↵bors-17/+38
r=GuillaumeGomez,ChrisDenton,wesleywiser Add support for Arm64EC to the Standard Library Adds the final pieces so that the standard library can be built for arm64ec-pc-windows-msvc (initially added in #119199) * Bumps `windows-sys` to 0.56.0, which adds support for Arm64EC. * Correctly set the `isEC` parameter for LLVM's `writeArchive` function. * Add `#![feature(asm_experimental_arch)]` to library crates where Arm64EC inline assembly is used, as it is currently unstable.