diff options
| author | bors <bors@rust-lang.org> | 2025-08-26 15:11:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-26 15:11:20 +0000 |
| commit | 91ee6a4057ce4bf1ab6d2f932cae497488d67c81 (patch) | |
| tree | 581c0f5857586659aab7d8a6dcfa95f2affecf2b /src | |
| parent | 5ab69249f36678c0a770a08d3d1b28a8103349ff (diff) | |
| parent | 0f30dcc271f61156240a782059010b77eb28ee6d (diff) | |
| download | rust-91ee6a4057ce4bf1ab6d2f932cae497488d67c81.tar.gz rust-91ee6a4057ce4bf1ab6d2f932cae497488d67c81.zip | |
Auto merge of #145886 - GuillaumeGomez:rollup-9qv7jhv, r=GuillaumeGomez
Rollup of 11 pull requests Successful merges: - rust-lang/rust#144373 (remove deprecated Error::description in impls) - rust-lang/rust#144551 (Add aarch64_be-unknown-linux-musl target) - rust-lang/rust#145076 (Add new Tier-3 target: riscv64a23-unknown-linux-gnu) - rust-lang/rust#145481 (Add parentheses for closure when suggesting calling closure) - rust-lang/rust#145596 (Losslessly optimize PNG files) - rust-lang/rust#145615 (Fix doc of `std::os::windows::io::BorrowedSocket::borrow_raw`) - rust-lang/rust#145841 (Always build miri for the host in `x run miri`) - rust-lang/rust#145861 (bootstrap: vendor `clippy_test_deps` too) - rust-lang/rust#145863 (formatting_options: Make all methods `const`) - rust-lang/rust#145867 (cg_llvm: Assert that LLVM range-attribute values don't exceed 128 bits) - rust-lang/rust#145875 (Make bootstrap command caching opt-in) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
26 files changed, 182 insertions, 34 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index f7a2dc14218..a4976139fe9 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -2031,6 +2031,7 @@ impl Step for Assemble { let host_llvm_bin_dir = command(&host_llvm_config) .arg("--bindir") + .cached() .run_capture_stdout(builder) .stdout() .trim() diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index b01832708df..778c3beb50f 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -2281,6 +2281,7 @@ fn maybe_install_llvm( { trace!("LLVM already built, installing LLVM files"); let mut cmd = command(host_llvm_config); + cmd.cached(); cmd.arg("--libfiles"); builder.verbose(|| println!("running {cmd:?}")); let files = cmd.run_capture_stdout(builder).stdout(); diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index 70259f0d1d7..d47c1495838 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -486,8 +486,11 @@ impl Step for Llvm { let LlvmResult { host_llvm_config, .. } = builder.ensure(Llvm { target: builder.config.host_target }); if !builder.config.dry_run() { - let llvm_bindir = - command(&host_llvm_config).arg("--bindir").run_capture_stdout(builder).stdout(); + let llvm_bindir = command(&host_llvm_config) + .arg("--bindir") + .cached() + .run_capture_stdout(builder) + .stdout(); let host_bin = Path::new(llvm_bindir.trim()); cfg.define( "LLVM_TABLEGEN", @@ -593,7 +596,13 @@ impl Step for Llvm { } pub fn get_llvm_version(builder: &Builder<'_>, llvm_config: &Path) -> String { - command(llvm_config).arg("--version").run_capture_stdout(builder).stdout().trim().to_owned() + command(llvm_config) + .arg("--version") + .cached() + .run_capture_stdout(builder) + .stdout() + .trim() + .to_owned() } pub fn get_llvm_version_major(builder: &Builder<'_>, llvm_config: &Path) -> u8 { diff --git a/src/bootstrap/src/core/build_steps/run.rs b/src/bootstrap/src/core/build_steps/run.rs index c6288f63847..d9de6b7ef96 100644 --- a/src/bootstrap/src/core/build_steps/run.rs +++ b/src/bootstrap/src/core/build_steps/run.rs @@ -5,13 +5,14 @@ use std::path::PathBuf; +use build_helper::exit; use clap_complete::{Generator, shells}; use crate::core::build_steps::dist::distdir; use crate::core::build_steps::test; use crate::core::build_steps::tool::{self, RustcPrivateCompilers, SourceType, Tool}; use crate::core::build_steps::vendor::{Vendor, default_paths_to_vendor}; -use crate::core::builder::{Builder, Kind, RunConfig, ShouldRun, Step}; +use crate::core::builder::{Builder, Kind, RunConfig, ShouldRun, Step, StepMetadata}; use crate::core::config::TargetSelection; use crate::core::config::flags::get_completion; use crate::utils::exec::command; @@ -100,8 +101,17 @@ impl Step for ReplaceVersionPlaceholder { } } +/// Invoke the Miri tool on a specified file. +/// +/// Note that Miri always executed on the host, as it is an interpreter. +/// That means that `x run miri --target FOO` will build miri for the host, +/// prepare a miri sysroot for the target `FOO` and then execute miri with +/// the target `FOO`. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Miri { + /// The build compiler that will build miri and the target compiler to which miri links. + compilers: RustcPrivateCompilers, + /// The target which will miri interpret. target: TargetSelection, } @@ -113,14 +123,9 @@ impl Step for Miri { } fn make_run(run: RunConfig<'_>) { - run.builder.ensure(Miri { target: run.target }); - } - - fn run(self, builder: &Builder<'_>) { - let host = builder.build.host_target; - let target = self.target; + let builder = run.builder; - // `x run` uses stage 0 by default but miri does not work well with stage 0. + // `x run` uses stage 0 by default, but miri does not work well with stage 0. // Change the stage to 1 if it's not set explicitly. let stage = if builder.config.is_explicit_stage() || builder.top_stage >= 1 { builder.top_stage @@ -129,14 +134,22 @@ impl Step for Miri { }; if stage == 0 { - eprintln!("miri cannot be run at stage 0"); - std::process::exit(1); + eprintln!("ERROR: miri cannot be run at stage 0"); + exit!(1); } - // This compiler runs on the host, we'll just use it for the target. - let compilers = RustcPrivateCompilers::new(builder, stage, target); - let miri_build = builder.ensure(tool::Miri::from_compilers(compilers)); - let host_compiler = miri_build.build_compiler; + // Miri always runs on the host, because it can interpret code for any target + let compilers = RustcPrivateCompilers::new(builder, stage, builder.host_target); + + run.builder.ensure(Miri { compilers, target: run.target }); + } + + fn run(self, builder: &Builder<'_>) { + let host = builder.build.host_target; + let compilers = self.compilers; + let target = self.target; + + builder.ensure(tool::Miri::from_compilers(compilers)); // Get a target sysroot for Miri. let miri_sysroot = @@ -147,7 +160,7 @@ impl Step for Miri { // add_rustc_lib_path does not add the path that contains librustc_driver-<...>.so. let mut miri = tool::prepare_tool_cargo( builder, - host_compiler, + compilers.build_compiler(), Mode::ToolRustc, host, Kind::Run, @@ -167,6 +180,10 @@ impl Step for Miri { miri.into_cmd().run(builder); } + + fn metadata(&self) -> Option<StepMetadata> { + Some(StepMetadata::run("miri", self.target).built_by(self.compilers.build_compiler())) + } } #[derive(Debug, Clone, Hash, PartialEq, Eq)] diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index b52707032ba..a6156cad6fc 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -2043,6 +2043,7 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?} if !builder.config.dry_run() { let llvm_version = get_llvm_version(builder, &host_llvm_config); let llvm_components = command(&host_llvm_config) + .cached() .arg("--components") .run_capture_stdout(builder) .stdout(); @@ -2062,8 +2063,11 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?} // separate compilations. We can add LLVM's library path to the // rustc args as a workaround. if !builder.config.dry_run() && suite.ends_with("fulldeps") { - let llvm_libdir = - command(&host_llvm_config).arg("--libdir").run_capture_stdout(builder).stdout(); + let llvm_libdir = command(&host_llvm_config) + .cached() + .arg("--libdir") + .run_capture_stdout(builder) + .stdout(); let link_llvm = if target.is_msvc() { format!("-Clink-arg=-LIBPATH:{llvm_libdir}") } else { diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index c10b8253646..b62c9a906b7 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -1581,10 +1581,6 @@ impl Builder<'_> { /// `host`. pub fn tool_cmd(&self, tool: Tool) -> BootstrapCommand { let mut cmd = command(self.tool_exe(tool)); - - // Do not cache tool invocations, as they can have side effects - cmd.do_not_cache(); - let compiler = self.compiler(0, self.config.host_target); let host = &compiler.host; // Prepares the `cmd` provided to be able to run the `compiler` provided. diff --git a/src/bootstrap/src/core/build_steps/vendor.rs b/src/bootstrap/src/core/build_steps/vendor.rs index 7b860ceb943..0e9d4e7e32b 100644 --- a/src/bootstrap/src/core/build_steps/vendor.rs +++ b/src/bootstrap/src/core/build_steps/vendor.rs @@ -19,6 +19,7 @@ pub const VENDOR_DIR: &str = "vendor"; pub fn default_paths_to_vendor(builder: &Builder<'_>) -> Vec<(PathBuf, Vec<&'static str>)> { [ ("src/tools/cargo/Cargo.toml", vec!["src/tools/cargo"]), + ("src/tools/clippy/clippy_test_deps/Cargo.toml", vec![]), ("src/tools/rust-analyzer/Cargo.toml", vec![]), ("compiler/rustc_codegen_cranelift/Cargo.toml", vec![]), ("compiler/rustc_codegen_gcc/Cargo.toml", vec![]), diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index 72192403412..9c417952a5f 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -132,10 +132,7 @@ impl Cargo { } pub fn into_cmd(self) -> BootstrapCommand { - let mut cmd: BootstrapCommand = self.into(); - // Disable caching for commands originating from Cargo-related operations. - cmd.do_not_cache(); - cmd + self.into() } /// Same as [`Cargo::new`] except this one doesn't configure the linker with @@ -1085,7 +1082,7 @@ impl Builder<'_> { && let Some(llvm_config) = self.llvm_config(target) { let llvm_libdir = - command(llvm_config).arg("--libdir").run_capture_stdout(self).stdout(); + command(llvm_config).cached().arg("--libdir").run_capture_stdout(self).stdout(); if target.is_msvc() { rustflags.arg(&format!("-Clink-arg=-LIBPATH:{llvm_libdir}")); } else { diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index 76cade25a03..27e416359a9 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -181,6 +181,10 @@ impl StepMetadata { Self::new(name, target, Kind::Test) } + pub fn run(name: &str, target: TargetSelection) -> Self { + Self::new(name, target, Kind::Run) + } + fn new(name: &str, target: TargetSelection, kind: Kind) -> Self { Self { name: name.to_string(), kind, target, built_by: None, stage: None, metadata: None } } diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 4d47562c7ce..f7067d11450 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -2427,6 +2427,24 @@ mod snapshot { [dist] src <> "); } + + // Check that `x run miri --target FOO` actually builds miri for the host. + #[test] + fn run_miri() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("run") + .path("miri") + .stage(1) + .targets(&[TEST_TRIPLE_1]) + .render_steps(), @r" + [build] llvm <host> + [build] rustc 0 <host> -> rustc 1 <host> + [build] rustc 0 <host> -> miri 1 <host> + [build] rustc 0 <host> -> cargo-miri 1 <host> + [run] rustc 0 <host> -> miri 1 <target1> + "); + } } struct ExecutedSteps { diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index e5c2e3c64b8..3e9c8ccb4fa 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -960,8 +960,8 @@ impl Config { Subcommand::Dist => flags_stage.or(build_dist_stage).unwrap_or(2), Subcommand::Install => flags_stage.or(build_install_stage).unwrap_or(2), Subcommand::Perf { .. } => flags_stage.unwrap_or(1), - // These are all bootstrap tools, which don't depend on the compiler. - // The stage we pass shouldn't matter, but use 0 just in case. + // Most of the run commands execute bootstrap tools, which don't depend on the compiler. + // Other commands listed here should always use bootstrap tools. Subcommand::Clean { .. } | Subcommand::Run { .. } | Subcommand::Setup { .. } diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index 4916ebbd610..099ec488397 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -34,6 +34,7 @@ pub struct Finder { // Targets can be removed from this list once they are present in the stage0 compiler (usually by updating the beta compiler of the bootstrap). const STAGE0_MISSING_TARGETS: &[&str] = &[ "armv7a-vex-v5", + "riscv64a23-unknown-linux-gnu", // just a dummy comment so the list doesn't get onelined "aarch64_be-unknown-hermit", "aarch64_be-unknown-none-softfloat", diff --git a/src/bootstrap/src/utils/exec.rs b/src/bootstrap/src/utils/exec.rs index 9a536f75ab7..e09f3086b77 100644 --- a/src/bootstrap/src/utils/exec.rs +++ b/src/bootstrap/src/utils/exec.rs @@ -264,8 +264,11 @@ impl<'a> BootstrapCommand { self } - pub fn do_not_cache(&mut self) -> &mut Self { - self.should_cache = false; + /// Cache the command. If it will be executed multiple times with the exact same arguments + /// and environment variables in the same bootstrap invocation, the previous result will be + /// loaded from memory. + pub fn cached(&mut self) -> &mut Self { + self.should_cache = true; self } @@ -425,7 +428,7 @@ impl From<Command> for BootstrapCommand { fn from(command: Command) -> Self { let program = command.get_program().to_owned(); Self { - should_cache: true, + should_cache: false, command, failure_behavior: BehaviorOnFailure::Exit, run_in_dry_run: false, diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs index 451482717b6..e802c0214dd 100644 --- a/src/bootstrap/src/utils/helpers.rs +++ b/src/bootstrap/src/utils/helpers.rs @@ -510,6 +510,8 @@ pub fn check_cfg_arg(name: &str, values: Option<&[&str]>) -> String { #[track_caller] pub fn git(source_dir: Option<&Path>) -> BootstrapCommand { let mut git = command("git"); + // git commands are almost always read-only, so cache them by default + git.cached(); if let Some(source_dir) = source_dir { git.current_dir(source_dir); diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index b53494ed98d..e0d637a2a67 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -49,6 +49,7 @@ - [aarch64-nintendo-switch-freestanding](platform-support/aarch64-nintendo-switch-freestanding.md) - [aarch64-unknown-linux-musl](platform-support/aarch64-unknown-linux-musl.md) - [aarch64_be-unknown-none-softfloat](platform-support/aarch64_be-unknown-none-softfloat.md) + - [aarch64_be-unknown-linux-musl](platform-support/aarch64_be-unknown-linux-musl.md) - [amdgcn-amd-amdhsa](platform-support/amdgcn-amd-amdhsa.md) - [armeb-unknown-linux-gnueabi](platform-support/armeb-unknown-linux-gnueabi.md) - [arm-none-eabi](platform-support/arm-none-eabi.md) @@ -106,6 +107,7 @@ - [riscv32imac-unknown-xous-elf](platform-support/riscv32imac-unknown-xous-elf.md) - [riscv64gc-unknown-linux-gnu](platform-support/riscv64gc-unknown-linux-gnu.md) - [riscv64gc-unknown-linux-musl](platform-support/riscv64gc-unknown-linux-musl.md) + - [riscv64a23-unknown-linux-gnu](platform-support/riscv64a23-unknown-linux-gnu.md) - [s390x-unknown-linux-gnu](platform-support/s390x-unknown-linux-gnu.md) - [s390x-unknown-linux-musl](platform-support/s390x-unknown-linux-musl.md) - [sparc-unknown-none-elf](./platform-support/sparc-unknown-none-elf.md) diff --git a/src/doc/rustc/src/images/image1.png b/src/doc/rustc/src/images/image1.png index 0da45e56620..3aad6359389 100644 --- a/src/doc/rustc/src/images/image1.png +++ b/src/doc/rustc/src/images/image1.png Binary files differdiff --git a/src/doc/rustc/src/images/image2.png b/src/doc/rustc/src/images/image2.png index a9cf23f8737..085b1c490b8 100644 --- a/src/doc/rustc/src/images/image2.png +++ b/src/doc/rustc/src/images/image2.png Binary files differdiff --git a/src/doc/rustc/src/images/image3.png b/src/doc/rustc/src/images/image3.png index 844a2fe6747..ee332f51055 100644 --- a/src/doc/rustc/src/images/image3.png +++ b/src/doc/rustc/src/images/image3.png Binary files differdiff --git a/src/doc/rustc/src/images/llvm-cov-show-01.png b/src/doc/rustc/src/images/llvm-cov-show-01.png index 35f04594347..ce4dec128b6 100644 --- a/src/doc/rustc/src/images/llvm-cov-show-01.png +++ b/src/doc/rustc/src/images/llvm-cov-show-01.png Binary files differdiff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 3bf87994297..22d32a29b36 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -273,6 +273,7 @@ target | std | host | notes [`aarch64_be-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit (big-endian) `aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian) `aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI) +[`aarch64_be-unknown-linux-musl`](platform-support/aarch64_be-unknown-linux-musl.md) | ✓ | ✓ | ARM64 Linux (big-endian) with musl-libc 1.2.5 [`aarch64_be-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | ARM64 NetBSD (big-endian) [`aarch64_be-unknown-none-softfloat`](platform-support/aarch64_be-unknown-none-softfloat.md) | * | | Bare big-endian ARM64, softfloat [`amdgcn-amd-amdhsa`](platform-support/amdgcn-amd-amdhsa.md) | * | | `-Ctarget-cpu=gfx...` to specify [the AMD GPU] to compile for @@ -391,6 +392,7 @@ target | std | host | notes [`riscv64gc-unknown-nuttx-elf`](platform-support/nuttx.md) | ✓ | | RISC-V 64bit with NuttX [`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64 [`riscv64imac-unknown-nuttx-elf`](platform-support/nuttx.md) | ✓ | | RISC-V 64bit with NuttX +[`riscv64a23-unknown-linux-gnu`](platform-support/riscv64a23-unknown-linux-gnu.md) | ✓ | ✓ | RISC-V Linux (kernel 6.8.0+, glibc 2.39) [`s390x-unknown-linux-musl`](platform-support/s390x-unknown-linux-musl.md) | ✓ | | S390x Linux (kernel 3.2, musl 1.2.3) `sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux [`sparc-unknown-none-elf`](./platform-support/sparc-unknown-none-elf.md) | * | | Bare 32-bit SPARC V7+ diff --git a/src/doc/rustc/src/platform-support/aarch64_be-unknown-linux-musl.md b/src/doc/rustc/src/platform-support/aarch64_be-unknown-linux-musl.md new file mode 100644 index 00000000000..3e816dc8bfb --- /dev/null +++ b/src/doc/rustc/src/platform-support/aarch64_be-unknown-linux-musl.md @@ -0,0 +1,49 @@ +# aarch64_be-unknown-linux-musl + +**Tier: 3** + +ARM64 Linux (big-endian) with musl-libc. + +## Target maintainers + +[@neuschaefer](https://github.com/neuschaefer) +[@Gelbpunkt](https://github.com/Gelbpunkt) + +## Requirements + +The target requires a `aarch64_be-*-linux-musl` toolchain, which likely has to +be built from source because this is a rare combination. [Buildroot] provides +a way of doing so: + +- select _Target options_ → _Target Architecture_ → _AArch64 (big endian)_ +- select _Toolchain_ → _C library_ → _musl_ +- select _Toolchain_ → _Enable C++ support_ + +Host tools are supported. + +[Buildroot]: https://buildroot.org/ + + +## Building the target + +The target can be enabled in bootstrap.toml: + +```toml +[build] +target = ["aarch64_be-unknown-linux-musl"] + +[target.aarch64_be-unknown-linux-musl] +cc = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-cc" +cxx = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-c++" +linker = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-cc" +ar = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-ar" +ranlib = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-ranlib" +musl-root = "/path/to/buildroot/staging" +runner = "qemu-aarch64_be -L /path/to/buildroot/target" +crt-static = "/path/to/buildroot/target" +``` + + +## Testing + +Binaries can be run under `qemu-aarch64_be` or under a big-endian Linux kernel. diff --git a/src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md b/src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md new file mode 100644 index 00000000000..2cbaaa86654 --- /dev/null +++ b/src/doc/rustc/src/platform-support/riscv64a23-unknown-linux-gnu.md @@ -0,0 +1,41 @@ +# `riscv64a23-unknown-linux-gnu` + +**Tier: 3** + +RISC-V target using the ratified [RVA23 Profile](https://github.com/riscv/riscv-profiles/blob/main/src/rva23-profile.adoc). +This target will enable all mandary features of rva23u64 by default. + +## Target maintainers + +[@ZhongyaoChen](https://github.com/ZhongyaoChen) +[@CaiWeiran](https://github.com/CaiWeiran) + +## Requirements + +This target can be sucessfully build on the following platform: ubuntu 24.04 (Linux Kernel version 6.8.0, glibc 2.39). + +Other platforms may work, but are not tested. Please contanct if you encounter any issues. + +## Building the target + +Tier-3 target is not distributed through `rustup`. + +You need to build your own Rust, the target can be build with: + +```bash +./x build --target riscv64a23-unknown-linux-gnu +``` + +## Building Rust programs + +Add the toolchain: + +```bash +rustup toolchain link rva23-toolchain {path-to-rust}/build/host/stage2 +``` + +Then cross compile crates with: + +```bash +RUSTFLAGS="-C linker=riscv64-linux-gnu-gcc" cargo +rva23-toolchain build --target=riscv64a23-unknown-linux-gnu +``` diff --git a/src/doc/rustdoc/src/images/collapsed-long-item.png b/src/doc/rustdoc/src/images/collapsed-long-item.png index c382870c64a..6de759fbeb9 100644 --- a/src/doc/rustdoc/src/images/collapsed-long-item.png +++ b/src/doc/rustdoc/src/images/collapsed-long-item.png Binary files differdiff --git a/src/doc/rustdoc/src/images/collapsed-trait-impls.png b/src/doc/rustdoc/src/images/collapsed-trait-impls.png index f685656e09a..96cc7db6798 100644 --- a/src/doc/rustdoc/src/images/collapsed-trait-impls.png +++ b/src/doc/rustdoc/src/images/collapsed-trait-impls.png Binary files differdiff --git a/src/etc/installer/gfx/rust-logo.png b/src/etc/installer/gfx/rust-logo.png index 99ee7507fa2..49d8d0d9485 100644 --- a/src/etc/installer/gfx/rust-logo.png +++ b/src/etc/installer/gfx/rust-logo.png Binary files differdiff --git a/src/librustdoc/html/static/images/favicon-32x32.png b/src/librustdoc/html/static/images/favicon-32x32.png index 69b8613ce15..0670c4dabb0 100644 --- a/src/librustdoc/html/static/images/favicon-32x32.png +++ b/src/librustdoc/html/static/images/favicon-32x32.png Binary files differ |
