From 34c421210e967ffd85bb0f93025e20f43322b2dd Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 4 Nov 2021 10:17:23 +0100 Subject: [PATCH] rustc-1.56.1-0: Specify Rust binaries to use for bootstrapping From [Rust issue #90555][1]: > Rustc is self-hosted, which means it needs a rust compiler to build > itself so by default it downloads the previous version. > If your distro already has a one-older rust compiler you can use that > instead by adjusting your config.toml > > See the rustc-dev guide for an explanation of the build process. > > If you want to bootstrap from a C compiler you can start with mrustc, > e.g. that's what guix does (they have updated their workflow since that > blogpost). [Config template][2]: # Instead of downloading the src/stage0.json version of Cargo specified, use # this Cargo binary instead to build all Rust code #cargo = "/path/to/cargo" # Instead of downloading the src/stage0.json version of the compiler # specified, use this rustc binary instead as the stage0 snapshot compiler. #rustc = "/path/to/rustc" # Instead of download the src/stage0.json version of rustfmt specified, # use this rustfmt binary instead as the stage0 snapshot rustfmt. #rustfmt = "/path/to/rustfmt" [1]: https://github.com/rust-lang/rust/issues/90555 [2]: https://github.com/rust-lang/rust/blob/0b4ac62ddaf9ee01b8aaf9dd7097f1f541d64551/config.toml.example#L211-L221 --- rustc-1.56.1-0.build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rustc-1.56.1-0.build.sh b/rustc-1.56.1-0.build.sh index 0c45a8d..4743359 100755 --- a/rustc-1.56.1-0.build.sh +++ b/rustc-1.56.1-0.build.sh @@ -50,6 +50,10 @@ targets = "X86" experimental-targets = "" [build] +cargo = "/usr/local/package/bin/cargo" +rustc = "/usr/local/package/bin/rustc" +rustfmt = "/usr/local/package/bin/rustfmt" + # omit HTML docs to save time and space (comment this to build them) docs = false