about summary refs log tree commit diff
path: root/src/bootstrap/sanity.rs
AgeCommit message (Collapse)AuthorLines
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.
2018-11-02Remove all jemalloc-related contentAlex Crichton-6/+0
This commit removes all jemalloc related submodules, configuration, etc, from the bootstrap, from the standard library, and from the compiler. This will be followed up with a change to use jemalloc specifically as part of rustc on blessed platforms.
2018-10-26bootstrap: clean up a few clippy findingsMatthias Krüger-1/+1
remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
2018-10-08Run debuginfo tests against rust-enabled lldb, when possibleTom Tromey-13/+0
If the rust-enabled lldb was built, then use it when running the debuginfo tests. Updating the lldb submodule was necessary as this needed a way to differentiate the rust-enabled lldb, so I added a line to the --version output. This adds compiletest commands to differentiate between the rust-enabled and non-rust-enabled lldb, as is already done for gdb. A new "rust-lldb" header directive is also added, but not used in this patch; I plan to use it in #54004. This updates all the tests.
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-2/+2
2018-04-17Don't look for cc/cxx when testing with bogus targetsJohn Kåre Alsaker-4/+8
2018-04-03extend no-std-ness check to all *-none-* targetsJorge Aparicio-2/+2
2018-04-01add a dist-thumb builder to build rust-std for the THUMB targetsJorge Aparicio-0/+13
the rust-std component only contains the core and compiler-builtins (+c +mem) crates cc #49382
2018-01-22Do not assume dynamic linking for musl/mips[el] targetsMarco A L Barbosa-1/+1
All musl targets except mips[el] assume static linking by default. This can be confusing https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084 When the musl/mips[el] targets was [added](https://github.com/rust-lang/rust/pull/31298), dynamic linking was chosen because of binary size concerns, and probably also because libunwind [didn't](https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084/8) supported mips. Now that we have `crt-static` target-feature (the user can choose dynamic link for musl targets), and libunwind [6.0](https://github.com/llvm-mirror/libunwind/commits/release_60) add support to mips, we do not need to assume dynamic linking.
2018-01-04rustbuild: Don't allow stable bootstrap from devAlex Crichton-2/+13
I forgot to update the bootstrap compiler for the 1.23.0 release so let's make sure it doesn't happen again!
2017-11-21fix some typosMartin Lindhe-1/+1
2017-09-24Fix fuchsia toolchain prebuild setupJames Tucker-2/+3
* Adjust bootstrap to provide useful output on failure * Add missing package dependencies in the build environment * Fix permission bits on prebuilt toolchain files
2017-08-25rustbuild: Automatically enable Ninja on MSVCAlex Crichton-4/+21
Discovered in #43767 it turns out the default MSBuild generator in CMake for whatever reason isn't supporting many of the configuration options we give to LLVM. To improve the contributor experience automatically enable Ninja if we find it to ensure that "flavorful" configurations of LLVM work by default in more situations. Closes #43767
2017-08-22Infer a default musl_root for native buildsSamuel Holland-1/+8
2017-08-13Unify flags into config.Mark Simulacrum-4/+4
This introduces a slight change in behavior, where we unilaterally respect the --host and --target parameters passed for all sanity checking and runtime configuration.
2017-07-20Utilize interning to allow Copy/Clone stepsMark Simulacrum-5/+5
2017-07-04Use build.build instead of build.config.buildMark Simulacrum-2/+2
2017-07-04Move targets, hosts, and build triple into Build.Mark Simulacrum-11/+0
2017-07-04Remove src_is_git, instead call method on rust_info directly.Mark Simulacrum-1/+1
2017-07-04Clippy lintsMark Simulacrum-11/+7
2017-07-04Clean up and restructure sanity checking.Mark Simulacrum-76/+67