about summary refs log tree commit diff
path: root/src/bootstrap/sanity.rs
AgeCommit message (Collapse)AuthorLines
2023-10-17move bootstrap core implementation to bootstrap/src/core moduleonur-ozkan-267/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-17Auto merge of #115514 - onur-ozkan:bootstrap-codebase-improvements, ↵bors-11/+10
r=albertlarsan68 optimize and cleanup bootstrap source I suggest reviewing this commit by commit.
2023-09-17micro-level optimizations for bootstraponur-ozkan-11/+10
Overall optimizations for bootstrap on conditions, assertions, trait implementations, etc. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-02also skip musl checks when BOOTSTRAP_SKIP_TARGET_SANITY is setRalf Jung-10/+13
2023-07-30bootstrap: inline format!() argsMatthias Krüger-1/+1
2023-07-24bootstrap: Don't bundle musl on UnikraftMartin Kröning-1/+1
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2023-07-13Rename `detail_exit_macro` to `exit`jyn-1/+1
`detail` and `macro` weren't adding any info.
2023-05-30create `build_helper/src/util` modozkanonur-1/+1
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-17Spelling src/bootstrapJosh Soref-1/+1
* although * correct * granular * libunwind * repository * section Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-15add the build.reuse config option to choose the reuse binaryPietro Albini-0/+7
2022-11-13Make all download functions need only Config, not BuilderJoshua Nelson-1/+1
This also adds a new `mod download` instead of scattering the download code across `config.rs` and `native.rs`.
2022-11-12Distinguish `--dry-run` from the automatic dry run checkJoshua Nelson-2/+2
2022-11-07add FIXME to replace this env var in the futureRalf Jung-0/+6
2022-10-30skip bootstrap target sanity checks when testing MiriRalf Jung-0/+10
2022-10-01fix: use git-commit-info for version informationdawnofmidnight-1/+1
This PR adds support for fetching version information from the `git-commit-info` file when building the compiler from a source tarball.
2022-07-07squash the commitstoshiki goto-1/+1
implement detail_exit but I'm not sure it is right. not create new file and write detail exit in lib.rs replace std::process::exit to detail_exit that is not related to code runnning. remove pub
2022-05-07updated error message for missing cmakeThomas Hatzopoulos-1/+12
2022-03-29bootstrap: loosen and expand python check boundsAlec Goncharow-1/+3
2022-03-05Merge build_helper into utilbjorn3-1/+1
2022-03-05Remove build_helperbjorn3-2/+1
The majority of the code is only used by either rustbuild or rustc_llvm's build script. Rust_build is compiled once for rustbuild and once for every stage. This means that the majority of the code in this crate is needlessly compiled multiple times. By moving only the code actually used by the respective crates to rustbuild and rustc_llvm's build script, this needless duplicate compilation is avoided.
2021-08-26switch stage0.txt to stage0.json and add a tool to generate itPietro Albini-11/+1
2021-08-16Allow the iOS toolchain to be built on Linuxkit-5/+0
The iOS toolchain can be built on Linux with minor changes. The compilation will invoke `xcrun` to find the path to the iPhone SDK but a fake `xcrun` executable can be used. ``` #!/bin/sh echo "/path/to/sdk" ``` The iOS toolchain can then be built and linked with rustup. ``` $ ./x.py build --stage 2 --host x86_64-unknown-linux-gnu \ --target aarch64-apple-ios $ rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1 ``` It's possible to take this toolchain and compile an iOS executable with it. This requires the ld64 linker and an iOS SDK. The ld64 linker can be taken from [cctools](https://github.com/tpoechtrager/cctools-port). A project's .cargo/config can then be edited to use the linker for this target. ``` [target.aarch64-apple-ios] linker = "/path/to/cctools/bin/arm-apple-darwin-ld" rustflags = [ "-C", """ link-args= -F/path/to/sdk/System/Library/Frameworks -L/path/to/sdk/usr/lib -L/path/to/sdk/usr/lib/system/ -adhoc_codesign """, ] ```
2021-05-17Don't require cmake on Windows when LLVM isn't being builtJoshua Nelson-2/+3
Previously, setting `download-ci-llvm = true` when cmake wasn't installed would give the following error: ``` failed to execute command: "cmake" "--help" error: The system cannot find the file specified. (os error 2) ```
2021-02-21Add new rustdoc-gui test suiteGuillaume Gomez-0/+7
2020-12-31bootstrap: clippy fixesMatthias Krüger-1/+5
addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2020-12-13Rollup merge of #79970 - bjorn3:no_unnecessary_llvm_checkout, r=Mark-SimulacrumYuki Okushi-16/+20
Misc rustbuild improvements when the LLVM backend isn't used * Don't checkout llvm-project * Don't require cmake and ninja Fixes #78564
2020-12-12Don't require cmake and ninja when the LLVM backend is not usedbjorn3-16/+20
2020-12-11fix clippy::{needless_bool, manual_unwrap_or}Matthias Krüger-5/+1
2020-12-11don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-2/+2
2020-10-26Support enable/disable sanitizers/profiler per target12101111-1/+1
2020-09-16Remove unnecessary `clone()`s in bootstrapJoshua Nelson-2/+2
The performance difference is negligible, but it makes me feel better. Note that this does not remove some clones in `config`, because it would require changing the logic around (and performance doesn't matter for bootstrap).
2020-09-01Move ninja requirements to a dynamic check, when actually buildingMark Rousskov-36/+4
It isn't practical to determine whether we'll build LLVM very early in the pipeline, so move the ninja checking to a dynamic check.
2020-08-26Provide a better diagnostic if ninja isn't installedJosh Triplett-2/+10
Let people know that they can set ninja=false if they don't want to install ninja.
2020-07-17Teach bootstrap about target files vs target triplesJake Goulding-1/+5
`rustc` allows passing in predefined target triples as well as JSON target specification files. This change allows bootstrap to have the first inkling about those differences. This allows building a cross-compiler for an out-of-tree architecture (even though that compiler won't work for other reasons). Even if no one ever uses this functionality, I think the newtype around the `Interned<String>` improves the readability of the code.
2020-06-18bootstrap: Configurable musl libdirTomasz Miąsko-4/+4
Make it possible to customize the location of musl libdir using musl-libdir in config.toml, e.g., to use lib64 instead of lib.
2020-05-10remove lldb package from bootstrap, config and build-manifestRalf Jung-8/+0
it's not been built since a long time ago
2020-04-10Enforce Python 3 as much as possibleGuillaume Gomez-2/+0
2020-02-24bootstrap: Further centralize target defaulting logic.John Ericson-4/+3
Background: targets can be specied with or without config files; unneccessarily differences in the logic between those cases has caused a) the bug I tried to fix in the previous commit, b) the bug I introduced in the previous commit. The solution is to make the code paths the same as much as possible. 1. Targets are now not created from the `default` method. (I would both remove the impl if this was a public library, but just wrap it for convience becaues it's not.) Instead, there is a `from_triple` method which does the defaulting. 2. Besides the sanity checking, use the new method in the code reading config files. Now `no_std` is overriden iff set explicitly just like the other fields which are optional in the TOML AST type. 3. In sanity checking, just populate the map for all targets no matter what. That way do don't duplicate logic trying to be clever and remember which targets have "non standard" overrides. Sanity checking is back to just sanity checking, and out of the game of trying to default too.
2020-02-22Allow getting `no_std` from the config fileJohn Ericson-3/+1
Currently, it is only set correctly in the sanity checking implicit default fallback code. Having a config file at all will for force `no_std = false`.
2019-12-22Format the worldMark Rousskov-42/+61
2019-08-15Use libunwind from llvm-project submodule for musl targetsMarco A L Barbosa-4/+0
2019-07-23Fix building_llvm in sanity check, add swig sanity check.Pyry Kontio-2/+13
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-1/+1
2019-04-10Don't require a C compiler on wasm32John Kåre Alsaker-0/+5
2019-03-01look for python2 symlinks before bootstrap pythonAndy Russell-1/+1
Before this commit, if you're running x.py directly on a system where `python` is symlinked to Python 3, then the `python` config option will default to a Python 3 interpreter. This causes debuginfo tests to fail with an opaque error message, since they have a hard requirement on Python 2. This commit modifies the Python probe behavior to look for python2.7 and python2 *before* using the interpreter used to execute `x.py`.
2019-03-01fix an issue with path probing on WindowsAndy Russell-7/+9
The old logic would incorrectly look for "python2.exe" when searching for "python2.7.exe".
2019-01-27Create `nvptx64-nvidia-cuda` target specificationDenys Zariaiev-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10bootstrap: fix editionljedrz-1/+1
2018-12-07use top level `fs` functions where appropriateAndy Russell-5/+2
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.