summary refs log tree commit diff
path: root/config.toml.example
AgeCommit message (Collapse)AuthorLines
2022-12-10Rollup merge of #104512 - jyn514:download-ci-llvm-default, r=Mark-SimulacrumMatthias Krüger-4/+3
Set `download-ci-llvm = "if-available"` by default when `channel = dev` See https://github.com/rust-lang/compiler-team/issues/566. The motivation for changing the default is to avoid downloading and building LLVM when someone runs `x build` before running `x setup`. The motivation for only doing it on `channel = "dev"` is to avoid breaking distros or users installing from source. It works because `dev` is also the default channel. The diff looks larger than it is; most of it is moving the `llvm` branch below the `rust` so `config.channel` is set. r? `@Mark-Simulacrum` cc `@oli-obk` `@bjorn3` `@cuviper`
2022-11-24address review feedbackPietro Albini-4/+7
2022-11-19Set `download-ci-llvm = "if-available"` by default when `channel = "dev"`Joshua Nelson-4/+3
See https://github.com/rust-lang/compiler-team/issues/566. The motivation for changing the default is to avoid downloading and building LLVM when someone runs `x build` before running `x setup`. The motivation for only doing it on `channel = "dev"` is to avoid breaking distros or users installing from source. It works because `dev` is also the default channel. The diff looks larger than it is; most of it is moving the `llvm` branch below the `rust` so `config.channel` is set.
2022-11-15add the build.reuse config option to choose the reuse binaryPietro Albini-0/+7
2022-11-10Avoid runtime dependency on static libstdc++kubycsolutions-3/+4
Usually, we do want to use the static C++ library when building rustc_llvm, but do not want to have that dependency at compiler runtime. Change the defaults to Make It So.
2022-10-29Revert "Make the `c` feature for `compiler-builtins` opt-in instead of inferred"Mark Rousskov-4/+0
This reverts commit 3acb505ee560770c62bad5362f6caf7567d467b9 (PR #101833). The changes in this commit caused several bugs or at least incompatibilies. For now we're reverting this commit and will re-land it alongside fixes for those bugs.
2022-10-23Introduce dedicated `-Zdylib-lto` flag for enabling LTO on `dylib`sJakub Beránek-4/+4
2022-10-23Add `rust.lto` config optionJakub Beránek-0/+5
2022-10-02Auto merge of #100557 - dawnofmidnight:tarball-commit-info, r=Mark-Simulacrumbors-0/+6
fix: use git-commit-info for version information Fixes #33286. Fixes #86587. This PR changes the current `git-commit-hash` file that `./x.py` dist puts in the `rustc-{version}-src.tar.{x,g}z` to contain the hash, the short hash, and the commit date from which the tarball was created, assuming git was available when it was. It uses this for reading the version so that rustc has all the appropriate metadata. # Testing Testing this is kind of a pain. I did it with something like ```sh ./x.py dist # ensure that `ignore-git` is `false` in config.toml cp ./build/dist/rustc-1.65.0-dev-src.tar.gz ../rustc-1.65.0-dev-src.tar.gz cd .. && tar -xzf rustc-1.65.0-dev-src && cd rustc-1.65.0-dev-src ./x.py build ``` Then, the output of `rustc -vV` with the stage1 compiler should have the `commit-hash` and `commit-date` fields filled, rather than be `unknown`. To be completely sure, you can use `rustc --sysroot` with the stdlib that the original `./x.py dist` made, which will require that the metadata matches.
2022-10-01fix: use git-commit-info for version informationdawnofmidnight-0/+6
This PR adds support for fetching version information from the `git-commit-info` file when building the compiler from a source tarball.
2022-09-28Make the `c` feature for `compiler-builtins` opt-in instead of inferredJoshua Nelson-0/+4
The build script for `compiler_builtins` doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Rather than trying to fix it or special-case the platforms without bugs, make it opt-in instead of automatic.
2022-09-01Rollup merge of #101072 - tmandry:llvm-is-vanilla, r=Mark-SimulacrumMatthias Krüger-0/+4
bootstrap: Add llvm-has-rust-patches target option This is so you can check out an upstream commit in src/llvm-project and have everything just work. This simplifies the logic in `is_rust_llvm` a bit; it doesn't need to check for download-ci-llvm because we would have already errored if both that and llvm-config were specified on the host platform.
2022-08-29bootstrap: Add llvm-has-rust-patches target optionTyler Mandry-0/+4
This is so you can check out an upstream commit in src/llvm-project and have everything just work.
2022-08-06Document the `no-std` target option in config.toml.exampleNicholas Bishop-0/+4
2022-06-05Auto merge of #93717 - pietroalbini:pa-ci-profiler, r=Mark-Simulacrumbors-0/+6
Add build metrics to rustbuild This PR adds a new module of rustbuild, `ci_profiler`, whose job is to gather as much information as possible about the CI build as possible and store it in a JSON file uploaded to `ci-artifacts`. Right now for each step it collects: * Type name and debug representation of the `Step` object. * Duration of the step (excluding child steps). * Systemwide CPU stats for the duration of the step (both single core and all cores). * Which child steps were executed. This is capable of replacing both the scripts to collect CPU stats and the `[TIMING]` lines in build logs (not yet removed, until we port our tooling to use the CI profiler). The format is also extensible to be able in the future to collect more information. r? `@Mark-Simulacrum`
2022-05-24Make llvm-libunwind a per-target optionTyler Mandry-10/+15
2022-05-23Turn on `fast_submodules` unconditionallyJoshua Nelson-4/+0
I don't know why anyone would turn this off; doing so makes builds much slower (nearly a 60x slowdown according to #49057). Remove the option to do so, which makes bootstrap a little easier to maintain. Bootstrap continues to allow you to manage submodules manually by setting `submodules = false`.
2022-05-02add build metrics, to gather ci stats from x.pyPietro Albini-0/+6
This tool will generate a JSON file with statistics about each individual step to disk. It will be used in rust-lang/rust's CI to replace the mix of scripts and log scraping we currently have to gather this data.
2022-04-18bootstrap: disable split dwarf by defaultDavid Wood-7/+2
Signed-off-by: David Wood <david.wood@huawei.com>
2022-04-18bootstrap: add split-debuginfo configDavid Wood-7/+22
Replace `run-dysutil` option with more general `split-debuginfo` option that works on all platforms. Signed-off-by: David Wood <david.wood@huawei.com>
2022-03-10bootstrap: untangle static-libstdcpp & llvm-toolsJon Gjengset-1/+1
Previously, the static-libstdcpp setting was tied to llvm-tools such that enabling the latter always enabled the latter. This seems unfortunate, since it is entirely reasonable for someone to want to _not_ statically link stdc++, but _also_ want to build the llvm-tools. This patch therefore separates the two settings such that neither implies the other. On its own, that would change the default behavior in a way that's likely to surprise users. Specifically, users who build llvm-tools _likely_ want those tools to be statically compiled against libstdc++, since otherwise users with older GLIBCXX will be unable to run the vended tools. So, we also flip the default for the `static-libstdcpp` setting such that builds always link statically against libstdc++ by default, but it's _possible_ to opt out. See also #94719.
2022-02-27Use the first codegen backend in the config.toml as defaultbjorn3-1/+3
It is currently hard coded to llvm if enabled and cranelift otherwise. This made some sense when cranelift was the only alternative codegen backend. Since the introduction of the gcc backend this doesn't make much sense anymore. Before this PR bootstrapping rustc using a backend other than llvm or cranelift required changing the source of rustc_interface. With this PR it becomes a matter of putting the right backend as first enabled backend in config.toml.
2022-02-10Rollup merge of #93756 - tmandry:llvm-build-config, r=Mark-SimulacrumMatthias Krüger-0/+3
Support custom options for LLVM build The LLVM build has a lot of options that rustbuild doesn't need to know about. We should allow the user to customize the LLVM build directly. Here are some [example customizations][recipe] we'd like to do. [recipe]: https://fuchsia.googlesource.com/infra/recipes/+/90105e5e4e37b0441c8dde538df54a55f79b3d22/recipes/contrib/clang_toolchain.py#579
2022-02-09Add llvm.build-config optionTyler Mandry-0/+3
2022-01-01Stabilize -Z instrument-coverage as -C instrument-coverageJosh Triplett-2/+2
Continue supporting -Z instrument-coverage for compatibility for now, but show a deprecation warning for it. Update uses and documentation to use the -C option. Move the documentation from the unstable book to stable rustc documentation.
2021-12-31rustbuild: Add support for a per-target default-linker option.Maxim Cournoyer-3/+6
2021-10-23Auto merge of #90054 - michaelwoerister:v0-mangling-in-compiler, ↵bors-1/+5
r=Mark-Simulacrum Make new symbol mangling scheme default for compiler itself. As suggest in https://github.com/rust-lang/rust/pull/89917#issuecomment-945888574, this PR enables the new symbol mangling scheme for the compiler itself. The standard library is still compiled using the legacy mangling scheme so that the new symbol format does not show up in user code (yet). r? `@Mark-Simulacrum`
2021-10-19Make new symbol mangling scheme default for compiler itself.Michael Woerister-1/+5
2021-10-18config: add the option to enable LLVM testsAugie Fackler-0/+6
I'm working on some LLVM patches in concert with a Rust patch, and it's helping me quite a bit to have this as an option. It doesn't seem that hard, so I figured I'd formalize it in x.py and send it upstream.
2021-10-13Rollup merge of #89840 - wangkirin:master, r=jyn514Yuki Okushi-3/+3
fix the stage0 tools config file path in `config.toml.example` in #88362 , the `stage0.txt ` have been switched to `stage0.json` , but in `config.toml.example` the guide didn't change , this PR fix this issue
2021-10-13fix the stage0 tools config file path in config.toml.exampleWang Qilin-3/+3
2021-10-12Add missing entries for overflow-checks to config.toml.example.Hans Kratz-0/+12
2021-10-02bootstrap: add config option for nix patchingDavid Wood-0/+6
On NixOS systems, bootstrap will patch rustc used in bootstrapping after checking `/etc/os-release` (to confirm the current distribution is NixOS). However, when using Nix on a non-NixOS system, it can be desirable for bootstrap to patch rustc. In this commit, a `patch-binaries-for-nix` option is added to `config.toml`, which allows for user opt-in to bootstrap's Nix patching. Signed-off-by: David Wood <david.wood@huawei.com>
2021-09-17bootstrap: Add LLVM target matching for M68kJohn Paul Adrian Glaubitz-1/+1
2021-07-31add two new build flags to build clang and enable llvm pluginsManuel Drehwald-0/+6
2021-07-16Fix download-ci-llvm help commentAdam Gemmell-1/+1
2021-06-21Delete spacesAlexander Melentyev-2/+2
2021-06-06Auto merge of #79608 - alessandrod:bpf, r=nagisabors-1/+1
BPF target support This adds `bpfel-unknown-none` and `bpfeb-unknown-none`, two new no_std targets that generate little and big endian BPF. The approach taken is very similar to the cuda target, where `TargetOptions::obj_is_bitcode` is enabled and code generation is done by the linker. I added the targets to `dist-various-2`. There are [some tests](https://github.com/alessandrod/bpf-linker/tree/main/tests/assembly) in bpf-linker and I'm planning to add more. Those are currently not ran as part of rust CI.
2021-05-30BPF: review fixesAlessandro Decina-1/+1
2021-05-26cleanup and fix compiling of libunwind12101111-0/+8
fix conditional compiling of llvm-libunwind feaure for musl target. update document of llvm-libunwind feature.
2021-05-23Add BPF target to config.toml.exampleAlessandro Decina-1/+1
2021-05-09Remove outdated FIXME for download-rustcJoshua Nelson-2/+0
2021-04-07Auto merge of #82451 - jyn514:defaults, r=Mark-Simulacrumbors-69/+67
Cleanup option parsing and config.toml.example - Add an assertion that `link-shared = true` when `thin-lto = true`. Previously, link-shared would be silently overwritten. - Get rid of `Option<bool>` in bootstrap/config.rs. Set defaults immediately instead of delaying until later in bootstrap. This makes it easier to find what the default value is. - Remove redundant `config.x = false` when the default was already false - Set defaults for `bindir` in `default_opts()` instead of `parse()` - Update `download-ci-llvm = if-supported` option to match bootstrap.py - Remove redundant check for link_shared. Previously, it was checked twice. - Update various options in config.toml.example to their defaults. Previously, some options showed an example value instead of the default value. - Fix incorrect defaults in config.toml.example + `use-libcxx` defaults to false + Add missing `check-stage = 0` + Update several defaults to be conditional (e.g. `if incremental { 10 } else { 100 }`) - Remove redundant defaults in prose - Use the same comment for the default and target-dependent `musl-root` - Fix typos - Link to `cc_detect` for `cc` and `cxx`, since the logic is ... complicated. - Update more defaults to better reflect how they actually get set - Remove ignored `gpg-password-file` option This stopped being used in 7704d35, but was never removed from config.toml. - Remove unused flags from `config.toml` + Disallow `infodir` and `localstatedir` in `config.toml` + Allow the flags in `./configure`, but give a warning that they will be ignored. + Fix incorrect comment that `datadir` will be ignored. Example output: ``` $ ./configure --set install.infodir=xxx configure: processing command line configure: configure: install.infodir := xxx configure: build.configure-args := ['--set', 'install.infodir=xxx'] warning: infodir will be ignored configure: configure: writing `config.toml` in current directory configure: configure: run `python /home/joshua/rustc3/x.py --help` configure: ``` - Update CHANGELOG cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/bootstrap.20defaults
2021-04-07Cleanup option parsing and config.toml.exampleJoshua Nelson-69/+67
- Add an assertion that `link-shared = true` when `thin-lto = true`. Previously, link-shared would be silently overwritten. - Get rid of `Option<bool>` in bootstrap/config.rs. Set defaults immediately instead of delaying until later in bootstrap. This makes it easier to find what the default value is. - Remove redundant `config.x = false` when the default was already false - Set defaults for `bindir` in `default_opts()` instead of `parse()` - Update `download-ci-llvm = if-supported` option to match bootstrap.py - Remove redundant check for link_shared. Previously, it was checked twice. - Update various options in config.toml.example to their defaults. Previously, some options showed an example value instead of the default value. - Fix incorrect defaults in config.toml.example + `use-libcxx` defaults to false + Add missing `check-stage = 0` + Update several defaults to be conditional (e.g. `if incremental { 10 } else { 100 }`) - Remove redundant defaults in prose - Use the same comment for the default and target-dependent `musl-root` - Fix typos - Link to `cc_detect` for `cc` and `cxx`, since the logic is ... complicated. - Update more defaults to better reflect how they actually get set - Remove ignored `gpg-password-file` option This stopped being used in https://github.com/rust-lang/rust/commit/7704d35accfe1b587ce41ea09ca3bf6a47aca117, but was never removed from config.toml. - Remove unused flags from `config.toml` + Disallow `infodir` and `localstatedir` in `config.toml` + Allow the flags in `./configure`, but give a warning that they will be ignored. + Fix incorrect comment that `datadir` will be ignored. Example output: ``` $ ./configure --set install.infodir=xxx configure: processing command line configure: configure: install.infodir := xxx configure: build.configure-args := ['--set', 'install.infodir=xxx'] warning: infodir will be ignored configure: configure: writing `config.toml` in current directory configure: configure: run `python /home/joshua/rustc3/x.py --help` configure: ``` - Update CHANGELOG - Add "as an example" where appropriate - Link to an issue instead of to ephemeral chats
2021-04-05Rollup merge of #83368 - jyn514:download-if-unchanged, r=Mark-SimulacrumDylan DPC-1/+3
Add `download-rustc = "if-unchanged"` This allows keeping the setting to a fixed value without having to toggle it when you want to work on the compiler instead of on tools. This sets `BOOTSTRAP_DOWNLOAD_RUSTC` in bootstrap.py so rustbuild doesn't have to try and replicate its logic. Helps with https://github.com/rust-lang/rust/issues/81930. r? `@Mark-Simulacrum` cc `@camelid`
2021-04-05Add `download-rustc = "if-unchanged"`Joshua Nelson-1/+3
This allows keeping the setting to a fixed value without having to toggle it when you want to work on the compiler instead of on tools.
2021-04-03Make rust-demangler installableRich Kadel-4/+5
Adds bootstrap rules to support installing rust-demangler. When compiling with `-Z instrument-coverage`, the coverage reports are generated by `llvm-cov`. `llvm-cov` includes a built-in demangler for C++, and an option to supply an alternate demangler. For Rust, we have `rust-demangler`, currently used in `rustc` coverage tests. Fuchsia's toolchain for Rust is built via `./x.py install`. Fuchsia is adding support for Rust coverage, and we need to include the `rust-demangler` in the installed `bin` directory. Configured rust-demangler as an in-tree extended tool. Added tests to support `./x.py test rust-demangler`. Install with extended tools by default only if `profiler = true`.
2021-03-12Add a `disable-minification` option for rustdocMichael Howell-0/+5
This way, you can debug rustdoc's JavaScript and CSS file with normal F12 Dev Tools and you'll have useful line numbers to work with.
2021-03-01Rollup merge of #82360 - osa1:issue82317, r=Mark-SimulacrumJoshua Nelson-1/+3
config.toml parsing error improvements Improve error messages for musl-libdir and wasi-root keys. Previously the parser would panic with `unwrap()`. Now it prints Target "wasm32-wasi" does not have a "wasi-root" key (and similar for the `musl-libdir` field, which is used in target that use musl) Also update comments around wasi-root field to make it clear that the field is only valid in wasm32-wasi target and needs to be moved to a `[target.wasm32-wasi]` section to be valid. Fixes #82317 --- r? `@Mark-Simulacrum`
2021-03-01config.toml error reporting:Ömer Sinan Ağacan-1/+3
Improve error messages for musl-libdir and wasi-root keys. Previously the parser would panic with `unwrap()`. Now it prints Target "wasm32-wasi" does not have a "wasi-root" key (and similar for the `musl-libdir` field, which is used in target that use musl) Also update comments around wasi-root field to make it clear that the field is only valid in wasm32-wasi target and needs to be moved to a `[target.wasm32-wasi]` section to be valid. Fixes #82317