Skip to content

Commit

Permalink
rustc-1.56.1-0: Specify Rust binaries to use for bootstrapping
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pmenzel committed Nov 4, 2021
1 parent c78ed36 commit 34c4212
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rustc-1.56.1-0.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34c4212

Please sign in to comment.