mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
replace config.toml to bootstrap.toml in src:doc:rustc
This commit is contained in:
parent
57645fa520
commit
85e9da8e60
@ -27,7 +27,7 @@ Rust's source-based code coverage requires the Rust "profiler runtime". Without
|
|||||||
|
|
||||||
The Rust `nightly` distribution channel includes the profiler runtime, by default.
|
The Rust `nightly` distribution channel includes the profiler runtime, by default.
|
||||||
|
|
||||||
> **Important**: If you are building the Rust compiler from the source distribution, the profiler runtime is _not_ enabled in the default `config.example.toml`. Edit your `config.toml` file and ensure the `profiler` feature is set it to `true` (either under the `[build]` section, or under the settings for an individual `[target.<triple>]`):
|
> **Important**: If you are building the Rust compiler from the source distribution, the profiler runtime is _not_ enabled in the default `bootstrap.example.toml`. Edit your `bootstrap.toml` file and ensure the `profiler` feature is set it to `true` (either under the `[build]` section, or under the settings for an individual `[target.<triple>]`):
|
||||||
>
|
>
|
||||||
> ```toml
|
> ```toml
|
||||||
> # Build the profiler runtime (required when compiling with options that depend
|
> # Build the profiler runtime (required when compiling with options that depend
|
||||||
|
@ -28,7 +28,7 @@ What format do binaries use by default? ELF, PE, something else?
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
If Rust doesn't build the target by default, how can users build it? Can users
|
If Rust doesn't build the target by default, how can users build it? Can users
|
||||||
just add it to the `target` list in `config.toml`?
|
just add it to the `target` list in `bootstrap.toml`?
|
||||||
|
|
||||||
## Building Rust programs
|
## Building Rust programs
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ exec /path/to/ohos-sdk/linux/native/llvm/bin/clang++ \
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
To build a rust toolchain, create a `config.toml` with the following contents:
|
To build a rust toolchain, create a `bootstrap.toml` with the following contents:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
profile = "compiler"
|
profile = "compiler"
|
||||||
|
@ -47,7 +47,7 @@ $ rustup target add x86_64-apple-ios
|
|||||||
```
|
```
|
||||||
|
|
||||||
The tier 3 targets can be built by enabling them for a `rustc` build in
|
The tier 3 targets can be built by enabling them for a `rustc` build in
|
||||||
`config.toml`, by adding, for example:
|
`bootstrap.toml`, by adding, for example:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -52,7 +52,7 @@ The following APIs are currently known to have missing or incomplete support:
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
The targets can be built by enabling them for a `rustc` build in
|
The targets can be built by enabling them for a `rustc` build in
|
||||||
`config.toml`, by adding, for example:
|
`bootstrap.toml`, by adding, for example:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -31,7 +31,7 @@ case `XROS_DEPLOYMENT_TARGET`.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
The targets can be built by enabling them for a `rustc` build in
|
The targets can be built by enabling them for a `rustc` build in
|
||||||
`config.toml`, by adding, for example:
|
`bootstrap.toml`, by adding, for example:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -37,7 +37,7 @@ case `WATCHOS_DEPLOYMENT_TARGET`.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
The targets can be built by enabling them for a `rustc` build in
|
The targets can be built by enabling them for a `rustc` build in
|
||||||
`config.toml`, by adding, for example:
|
`bootstrap.toml`, by adding, for example:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -16,7 +16,7 @@ See the docs on [`*-apple-darwin`](apple-darwin.md) for general macOS requiremen
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`:
|
You can build Rust with support for the targets by adding it to the `target` list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -14,7 +14,7 @@ See the docs on [`*-apple-ios`](apple-ios.md) for general iOS requirements.
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`:
|
You can build Rust with support for the targets by adding it to the `target` list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -15,7 +15,7 @@ To build this target Xcode 12 or higher on macOS is required.
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`:
|
You can build Rust with support for the targets by adding it to the `target` list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -56,7 +56,7 @@ To put this in practice:
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target`
|
You can build Rust with support for the targets by adding it to the `target`
|
||||||
list in `config.toml`:
|
list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -21,7 +21,7 @@ The target definition can be seen [here](https://github.com/rust-lang/rust/blob/
|
|||||||
## Building the target
|
## Building the target
|
||||||
Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target.
|
Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target.
|
||||||
|
|
||||||
Therefore, you can build Rust with support for the target by adding it to the target list in config.toml, a sample configuration is shown below. It is expected that the user already have a working GNU compiler toolchain and update the paths accordingly.
|
Therefore, you can build Rust with support for the target by adding it to the target list in bootstrap.toml, a sample configuration is shown below. It is expected that the user already have a working GNU compiler toolchain and update the paths accordingly.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[llvm]
|
[llvm]
|
||||||
|
@ -50,7 +50,7 @@ This target generates binaries in the ELF format.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the target by adding it to the `target`
|
You can build Rust with support for the target by adding it to the `target`
|
||||||
list in `config.toml` and providing paths to the devkitARM toolchain.
|
list in `bootstrap.toml` and providing paths to the devkitARM toolchain.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -22,7 +22,7 @@ If you don't already have a suitable toolchain, download one [here](https://tool
|
|||||||
|
|
||||||
### Configure rust
|
### Configure rust
|
||||||
|
|
||||||
The target can be built by enabling it for a `rustc` build, by placing the following in `config.toml`:
|
The target can be built by enabling it for a `rustc` build, by placing the following in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -36,7 +36,7 @@ If you don't already have a suitable toolchain, you can download from [here](htt
|
|||||||
|
|
||||||
### Configure rust
|
### Configure rust
|
||||||
|
|
||||||
The target can be built by enabling it for a `rustc` build, by placing the following in `config.toml`:
|
The target can be built by enabling it for a `rustc` build, by placing the following in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -180,7 +180,7 @@ Fuchsia as well. A recent version (14+) of clang should be sufficient to compile
|
|||||||
Rust for Fuchsia.
|
Rust for Fuchsia.
|
||||||
|
|
||||||
x86-64 and AArch64 Fuchsia targets can be enabled using the following
|
x86-64 and AArch64 Fuchsia targets can be enabled using the following
|
||||||
configuration in `config.toml`:
|
configuration in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
@ -212,7 +212,7 @@ cxx = "clang++"
|
|||||||
|
|
||||||
By default, the Rust compiler installs itself to `/usr/local` on most UNIX
|
By default, the Rust compiler installs itself to `/usr/local` on most UNIX
|
||||||
systems. You may want to install it to another location (e.g. a local `install`
|
systems. You may want to install it to another location (e.g. a local `install`
|
||||||
directory) by setting a custom prefix in `config.toml`:
|
directory) by setting a custom prefix in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[install]
|
[install]
|
||||||
@ -695,7 +695,7 @@ We can then use the script to start our test environment with:
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `${RUST_SRC_PATH}/build` is the `build-dir` set in `config.toml`.
|
Where `${RUST_SRC_PATH}/build` is the `build-dir` set in `bootstrap.toml`.
|
||||||
|
|
||||||
Once our environment is started, we can run our tests using `x.py` as usual. The
|
Once our environment is started, we can run our tests using `x.py` as usual. The
|
||||||
test runner script will run the compiled tests on an emulated Fuchsia device. To
|
test runner script will run the compiled tests on an emulated Fuchsia device. To
|
||||||
@ -705,7 +705,7 @@ run the full `tests/ui` test suite:
|
|||||||
( \
|
( \
|
||||||
source config-env.sh && \
|
source config-env.sh && \
|
||||||
./x.py \
|
./x.py \
|
||||||
--config config.toml \
|
--config bootstrap.toml \
|
||||||
--stage=2 \
|
--stage=2 \
|
||||||
test tests/ui \
|
test tests/ui \
|
||||||
--target x86_64-unknown-fuchsia \
|
--target x86_64-unknown-fuchsia \
|
||||||
@ -893,7 +893,7 @@ through our `x.py` invocation. The full invocation is:
|
|||||||
( \
|
( \
|
||||||
source config-env.sh && \
|
source config-env.sh && \
|
||||||
./x.py \
|
./x.py \
|
||||||
--config config.toml \
|
--config bootstrap.toml \
|
||||||
--stage=2 \
|
--stage=2 \
|
||||||
test tests/${TEST} \
|
test tests/${TEST} \
|
||||||
--target x86_64-unknown-fuchsia \
|
--target x86_64-unknown-fuchsia \
|
||||||
|
@ -31,7 +31,7 @@ Hermit binaries have the ELF format.
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`.
|
You can build Rust with support for the targets by adding it to the `target` list in `bootstrap.toml`.
|
||||||
To run the Hermit build scripts, you also have to enable your host target.
|
To run the Hermit build scripts, you also have to enable your host target.
|
||||||
The build scripts rely on `llvm-tools` and binaries are linked using `rust-lld`, so those have to be enabled as well.
|
The build scripts rely on `llvm-tools` and binaries are linked using `rust-lld`, so those have to be enabled as well.
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this
|
|||||||
target.
|
target.
|
||||||
|
|
||||||
Therefore, you can build Rust with support for the target by adding it to the
|
Therefore, you can build Rust with support for the target by adding it to the
|
||||||
target list in `config.toml`, a sample configuration is shown below.
|
target list in `bootstrap.toml`, a sample configuration is shown below.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -28,7 +28,7 @@ This target generates PIC ELF binaries.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the target by adding it to the `target`
|
You can build Rust with support for the target by adding it to the `target`
|
||||||
list in `config.toml`:
|
list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -17,7 +17,7 @@ You'll need the macOS 10.13 SDK shipped with Xcode 9. The location of the SDK
|
|||||||
can be passed to `rustc` using the common `SDKROOT` environment variable.
|
can be passed to `rustc` using the common `SDKROOT` environment variable.
|
||||||
|
|
||||||
Once you have that, you can build Rust with support for the target by adding
|
Once you have that, you can build Rust with support for the target by adding
|
||||||
it to the `target` list in `config.toml`:
|
it to the `target` list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -32,7 +32,7 @@ The target can be built by enabling it for a `rustc` build.
|
|||||||
target = ["aarch64-kmc-solid_asp3"]
|
target = ["aarch64-kmc-solid_asp3"]
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure `aarch64-kmc-elf-gcc` is included in `$PATH`. Alternatively, you can use GNU Arm Embedded Toolchain by adding the following to `config.toml`:
|
Make sure `aarch64-kmc-elf-gcc` is included in `$PATH`. Alternatively, you can use GNU Arm Embedded Toolchain by adding the following to `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.aarch64-kmc-solid_asp3]
|
[target.aarch64-kmc-solid_asp3]
|
||||||
|
@ -65,7 +65,7 @@ These targets are distributed through `rustup`, and otherwise require no
|
|||||||
special configuration.
|
special configuration.
|
||||||
|
|
||||||
If you need to build your own Rust for some reason though, the targets can be
|
If you need to build your own Rust for some reason though, the targets can be
|
||||||
simply enabled in `config.toml`. For example:
|
simply enabled in `bootstrap.toml`. For example:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
@ -73,7 +73,7 @@ target = ["loongarch64-unknown-linux-gnu"]
|
|||||||
```
|
```
|
||||||
|
|
||||||
Make sure the LoongArch toolchain binaries are reachable from `$PATH`.
|
Make sure the LoongArch toolchain binaries are reachable from `$PATH`.
|
||||||
Alternatively, you can explicitly configure the paths in `config.toml`:
|
Alternatively, you can explicitly configure the paths in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.loongarch64-unknown-linux-gnu]
|
[target.loongarch64-unknown-linux-gnu]
|
||||||
|
@ -46,7 +46,7 @@ scripts.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding them to the `target`
|
You can build Rust with support for the targets by adding them to the `target`
|
||||||
list in `config.toml`:
|
list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -67,7 +67,7 @@ The following procedure outlines the build process for the MIPS64 R6 target with
|
|||||||
|
|
||||||
### Prerequisite: Disable debuginfo
|
### Prerequisite: Disable debuginfo
|
||||||
|
|
||||||
An LLVM bug makes rustc crash if debug or debug info generation is enabled. You need to edit `config.toml` to disable this:
|
An LLVM bug makes rustc crash if debug or debug info generation is enabled. You need to edit `bootstrap.toml` to disable this:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[rust]
|
[rust]
|
||||||
@ -83,7 +83,7 @@ The crate `rustix` may try to link itself against MIPS R2 assembly, resulting in
|
|||||||
export RUSTFLAGS="--cfg rustix_use_libc"
|
export RUSTFLAGS="--cfg rustix_use_libc"
|
||||||
```
|
```
|
||||||
|
|
||||||
This will trigger warnings during build, as `-D warnings` is enabled by default. Disable `-D warnings` by editing `config.toml` to append the following:
|
This will trigger warnings during build, as `-D warnings` is enabled by default. Disable `-D warnings` by editing `bootstrap.toml` to append the following:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[rust]
|
[rust]
|
||||||
@ -116,7 +116,7 @@ target = ["mipsisa64r6el-unknown-linux-gnuabi64"]
|
|||||||
|
|
||||||
Make sure that `mipsisa64r6el-unknown-linux-gnuabi64-gcc` is available from your executable search path (`$PATH`).
|
Make sure that `mipsisa64r6el-unknown-linux-gnuabi64-gcc` is available from your executable search path (`$PATH`).
|
||||||
|
|
||||||
Alternatively, you can specify the directories to all necessary toolchain executables in `config.toml`:
|
Alternatively, you can specify the directories to all necessary toolchain executables in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.mipsisa64r6el-unknown-linux-gnuabi64]
|
[target.mipsisa64r6el-unknown-linux-gnuabi64]
|
||||||
|
@ -124,7 +124,7 @@ For conditional compilation, following QNX specific attributes are defined:
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
1. Create a `config.toml`
|
1. Create a `bootstrap.toml`
|
||||||
|
|
||||||
Example content:
|
Example content:
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ What format do binaries use by default? ELF, PE, something else?
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
If Rust doesn't build the target by default, how can users build it? Can users
|
If Rust doesn't build the target by default, how can users build it? Can users
|
||||||
just add it to the `target` list in `config.toml`?
|
just add it to the `target` list in `bootstrap.toml`?
|
||||||
|
|
||||||
## Building Rust programs
|
## Building Rust programs
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ linker = "/path/to/x86_64-unknown-linux-ohos-clang.sh"
|
|||||||
## Building the target from source
|
## Building the target from source
|
||||||
|
|
||||||
Instead of using `rustup`, you can instead build a rust toolchain from source.
|
Instead of using `rustup`, you can instead build a rust toolchain from source.
|
||||||
Create a `config.toml` with the following contents:
|
Create a `bootstrap.toml` with the following contents:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
profile = "compiler"
|
profile = "compiler"
|
||||||
|
@ -29,7 +29,7 @@ Like with any other Windows target, created binaries are in PE format.
|
|||||||
|
|
||||||
These targets can be easily cross-compiled
|
These targets can be easily cross-compiled
|
||||||
using [llvm-mingw](https://github.com/mstorsjo/llvm-mingw) toolchain or [MSYS2 CLANG*](https://www.msys2.org/docs/environments/) environments.
|
using [llvm-mingw](https://github.com/mstorsjo/llvm-mingw) toolchain or [MSYS2 CLANG*](https://www.msys2.org/docs/environments/) environments.
|
||||||
Just fill `[target.*]` sections for both build and resulting compiler and set installation prefix in `config.toml`.
|
Just fill `[target.*]` sections for both build and resulting compiler and set installation prefix in `bootstrap.toml`.
|
||||||
Then run `./x.py install`.
|
Then run `./x.py install`.
|
||||||
In my case I had ran `./x.py install --host x86_64-pc-windows-gnullvm --target x86_64-pc-windows-gnullvm` inside MSYS2 MINGW64 shell
|
In my case I had ran `./x.py install --host x86_64-pc-windows-gnullvm --target x86_64-pc-windows-gnullvm` inside MSYS2 MINGW64 shell
|
||||||
so `x86_64-pc-windows-gnu` was my build toolchain.
|
so `x86_64-pc-windows-gnu` was my build toolchain.
|
||||||
|
@ -23,7 +23,7 @@ The target can be built by enabling it for a `rustc` build.
|
|||||||
target = ["powerpc64le-unknown-linux-musl"]
|
target = ["powerpc64le-unknown-linux-musl"]
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure your C compiler is included in `$PATH`, then add it to the `config.toml`:
|
Make sure your C compiler is included in `$PATH`, then add it to the `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.powerpc64le-unknown-linux-musl]
|
[target.powerpc64le-unknown-linux-musl]
|
||||||
|
@ -27,7 +27,7 @@ Redox OS binaries use ELF as file format.
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`. In addition a copy of [relibc] needs to be present in the linker search path.
|
You can build Rust with support for the targets by adding it to the `target` list in `bootstrap.toml`. In addition a copy of [relibc] needs to be present in the linker search path.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -43,7 +43,7 @@ Calling `extern "C"` on the target uses the C calling convention outlined in the
|
|||||||
## Building for the zkVM
|
## Building for the zkVM
|
||||||
|
|
||||||
Programs for the zkVM could be built by adding it to the `target` list in
|
Programs for the zkVM could be built by adding it to the `target` list in
|
||||||
`config.toml`. However, we recommend building programs in our starter template
|
`bootstrap.toml`. However, we recommend building programs in our starter template
|
||||||
generated by the [cargo-risczero] utility and the [risc0-build] crate. This
|
generated by the [cargo-risczero] utility and the [risc0-build] crate. This
|
||||||
crate calls `rustc` with `-C "link-arg=-Ttext=` so that it maps the text in the
|
crate calls `rustc` with `-C "link-arg=-Ttext=` so that it maps the text in the
|
||||||
appropriate location as well as generating variables that represent the ELF and
|
appropriate location as well as generating variables that represent the ELF and
|
||||||
|
@ -24,7 +24,7 @@ The target can be built by enabling it for a `rustc` build.
|
|||||||
target = ["riscv32imac-unknown-xous-elf"]
|
target = ["riscv32imac-unknown-xous-elf"]
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure your C compiler is included in `$PATH`, then add it to the `config.toml`:
|
Make sure your C compiler is included in `$PATH`, then add it to the `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.riscv32imac-unknown-xous-elf]
|
[target.riscv32imac-unknown-xous-elf]
|
||||||
|
@ -26,7 +26,7 @@ These targets are distributed through `rustup`, and otherwise require no
|
|||||||
special configuration.
|
special configuration.
|
||||||
|
|
||||||
If you need to build your own Rust for some reason though, the targets can be
|
If you need to build your own Rust for some reason though, the targets can be
|
||||||
enabled in `config.toml`. For example:
|
enabled in `bootstrap.toml`. For example:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -22,7 +22,7 @@ The target can be built by enabling it for a `rustc` build.
|
|||||||
target = ["riscv64gc-unknown-linux-musl"]
|
target = ["riscv64gc-unknown-linux-musl"]
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure your C compiler is included in `$PATH`, then add it to the `config.toml`:
|
Make sure your C compiler is included in `$PATH`, then add it to the `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.riscv64gc-unknown-linux-musl]
|
[target.riscv64gc-unknown-linux-musl]
|
||||||
|
@ -34,7 +34,7 @@ This target is distributed through `rustup`, and otherwise requires no
|
|||||||
special configuration.
|
special configuration.
|
||||||
|
|
||||||
If you need to build your own Rust for some reason though, the target can be
|
If you need to build your own Rust for some reason though, the target can be
|
||||||
enabled in `config.toml`. For example:
|
enabled in `bootstrap.toml`. For example:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -33,7 +33,7 @@ Because it is Tier 3, Rust does not yet ship pre-compiled artifacts for this
|
|||||||
target.
|
target.
|
||||||
|
|
||||||
Therefore, you can build Rust with support for the target by adding it to the
|
Therefore, you can build Rust with support for the target by adding it to the
|
||||||
target list in `config.toml`, a sample configuration is shown below.
|
target list in `bootstrap.toml`, a sample configuration is shown below.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -34,7 +34,7 @@ considerations for binary layout will require linker options or linker scripts.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the target by adding it to the `target`
|
You can build Rust with support for the target by adding it to the `target`
|
||||||
list in `config.toml`:
|
list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -34,7 +34,7 @@ Instead, the Unikraft build system will produce the final Unikernel image for th
|
|||||||
|
|
||||||
## Building the targets
|
## Building the targets
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`:
|
You can build Rust with support for the targets by adding it to the `target` list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -252,7 +252,7 @@ This section contains information on how to use std on UEFI.
|
|||||||
|
|
||||||
### Build std
|
### Build std
|
||||||
The building std part is pretty much the same as the official [docs](https://rustc-dev-guide.rust-lang.org/getting-started.html).
|
The building std part is pretty much the same as the official [docs](https://rustc-dev-guide.rust-lang.org/getting-started.html).
|
||||||
The linker that should be used is `rust-lld`. Here is a sample `config.toml`:
|
The linker that should be used is `rust-lld`. Here is a sample `bootstrap.toml`:
|
||||||
```toml
|
```toml
|
||||||
[rust]
|
[rust]
|
||||||
lld = true
|
lld = true
|
||||||
|
@ -33,7 +33,7 @@ Rust for each target can be cross-compiled with its specific target vsb configur
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the `target` list in `config.toml`. In addition the workbench and wr-cc have to configured and activated.
|
You can build Rust with support for the targets by adding it to the `target` list in `bootstrap.toml`. In addition the workbench and wr-cc have to configured and activated.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -61,7 +61,7 @@ Building this target can be done by:
|
|||||||
* Configure the `wasm32-unknown-emscripten` target to get built.
|
* Configure the `wasm32-unknown-emscripten` target to get built.
|
||||||
* Ensure the `WebAssembly` target backend is not disabled in LLVM.
|
* Ensure the `WebAssembly` target backend is not disabled in LLVM.
|
||||||
|
|
||||||
These are all controlled through `config.toml` options. It should be possible
|
These are all controlled through `bootstrap.toml` options. It should be possible
|
||||||
to build this target on any platform. A minimal example configuration would be:
|
to build this target on any platform. A minimal example configuration would be:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
@ -65,7 +65,7 @@ Building this target can be done by:
|
|||||||
* Configure LLD to be built.
|
* Configure LLD to be built.
|
||||||
* Ensure the `WebAssembly` target backend is not disabled in LLVM.
|
* Ensure the `WebAssembly` target backend is not disabled in LLVM.
|
||||||
|
|
||||||
These are all controlled through `config.toml` options. It should be possible
|
These are all controlled through `bootstrap.toml` options. It should be possible
|
||||||
to build this target on any platform.
|
to build this target on any platform.
|
||||||
|
|
||||||
## Building Rust programs
|
## Building Rust programs
|
||||||
|
@ -107,7 +107,7 @@ flag, for example:
|
|||||||
|
|
||||||
Users need to install or built wasi-sdk since release 20.0
|
Users need to install or built wasi-sdk since release 20.0
|
||||||
https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20
|
https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20
|
||||||
and specify path to *wasi-root* `config.toml`
|
and specify path to *wasi-root* `bootstrap.toml`
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.wasm32-wasip1-threads]
|
[target.wasm32-wasip1-threads]
|
||||||
@ -115,7 +115,7 @@ wasi-root = ".../wasi-libc/sysroot"
|
|||||||
```
|
```
|
||||||
|
|
||||||
After that users can build this by adding it to the `target` list in
|
After that users can build this by adding it to the `target` list in
|
||||||
`config.toml`, or with `-Zbuild-std`.
|
`bootstrap.toml`, or with `-Zbuild-std`.
|
||||||
|
|
||||||
## Building Rust programs
|
## Building Rust programs
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ This target does not support `panic=unwind` at this time.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the target by adding it to the `target`
|
You can build Rust with support for the target by adding it to the `target`
|
||||||
list in `config.toml`, and the target also requires `lld` to be built to work.
|
list in `bootstrap.toml`, and the target also requires `lld` to be built to work.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -23,7 +23,7 @@ Like any other Windows target, the created binaries are in PE format.
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the target list in config.toml:
|
You can build Rust with support for the targets by adding it to the target list in bootstrap.toml:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -24,7 +24,7 @@ Like any other Windows target, the created binaries are in PE format.
|
|||||||
|
|
||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the targets by adding it to the target list in config.toml:
|
You can build Rust with support for the targets by adding it to the target list in bootstrap.toml:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
@ -73,7 +73,7 @@ Windows SDK, which can be acquired using [`xwin`](https://github.com/Jake-Shadle
|
|||||||
clang-cl /imsvc "$XWIN/crt/include" /imsvc "$XWIN/sdk/include/ucrt" /imsvc "$XWIN/sdk/include/um" /imsvc "$XWIN/sdk/include/shared" --target="x86_64-pc-windows-msvc" "$@"
|
clang-cl /imsvc "$XWIN/crt/include" /imsvc "$XWIN/sdk/include/ucrt" /imsvc "$XWIN/sdk/include/um" /imsvc "$XWIN/sdk/include/shared" --target="x86_64-pc-windows-msvc" "$@"
|
||||||
```
|
```
|
||||||
|
|
||||||
- In your config.toml, add the following lines:
|
- In your bootstrap.toml, add the following lines:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[target.x86_64-win7-windows-msvc]
|
[target.x86_64-win7-windows-msvc]
|
||||||
|
@ -39,7 +39,7 @@ scripts.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
You can build Rust with support for the target by adding it to the `target`
|
You can build Rust with support for the target by adding it to the `target`
|
||||||
list in `config.toml`:
|
list in `bootstrap.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[build]
|
[build]
|
||||||
|
@ -29,7 +29,7 @@ respects.
|
|||||||
## Building the target
|
## Building the target
|
||||||
|
|
||||||
Users on Apple targets can build this by adding it to the `target` list in
|
Users on Apple targets can build this by adding it to the `target` list in
|
||||||
`config.toml`, or with `-Zbuild-std`.
|
`bootstrap.toml`, or with `-Zbuild-std`.
|
||||||
|
|
||||||
## Building Rust programs
|
## Building Rust programs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user