about summary refs log tree commit diff
path: root/src/bootstrap/sanity.rs
AgeCommit message (Collapse)AuthorLines
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
2017-06-22Make Build.cxx() return a Result instead of panickingIan Douglas Scott-1/+1
2017-06-21Pass path to python from bootstrap.py to bootstrap.rsStepan Koltsov-0/+7
When bootstrap is executed with python not in `$PATH`, (e. g. `c:\Python27\python.exe x.py test`) bootstrap cannot find python and crashes. This commit passes path to python in `BOOTSTRAP_PYTHON` env var.
2017-05-02rustbuild: Sanity-check cmake for sanitizers tooJosh Stone-14/+13
It's possible to build the sanitizers when using an external LLVM, but we still need cmake for this. Extend the sanity check to look for cmake whenever sanitizers are enabled too.
2017-04-03Add a common Build::src_is_git flagJosh Stone-1/+1
2017-03-12Update usages of 'OSX' (and other old names) to 'macOS'.Corey Farwell-2/+2
As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-02-27travis: Split Android into dist/test imagesAlex Crichton-4/+0
PRs can't land againt beta right now because the android bot is filling up on disk space. I don't really know what's going on but the android bot is the longest one to run anyway so it'll benefit from being split up regardless.
2017-01-19travis: Get an emscripten builder onlineAlex Crichton-1/+1
This commit adds a new entry to the Travis matrix which will execute emscripten test suites. Along the way it updates a few bits of the test suite to continue passing on emscripten, such as: * Ignoring i128/u128 tests as they're presumably just not working (didn't investigate as to why) * Disabling a few process tests (not working on emscripten) * Ignore some num tests in libstd (#39119) * Fix some warnings when compiling
2016-12-27Accept ninja-build binary in place of ninjaRobin Kruppe-1/+5
2016-12-20Find FileCheck using llvm-configSeo Sanghyeon-1/+1
2016-12-14rustbuild: Add sccache supportAlex Crichton-0/+4
This commit adds support for sccache, a ccache-like compiler which works on MSVC and stores results into an S3 bucket. This also switches over all Travis and AppVeyor automation to using sccache to ensure a shared and unified cache over time which can be shared across builders. The support for sccache manifests as a new `--enable-sccache` option which instructs us to configure LLVM differently to use a 'sccache' binary instead of a 'ccache' binary. All docker images for Travis builds are updated to download Mozilla's tooltool builds of sccache onto various containers and systems. Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of our ccache goodies.
2016-12-07mk: Switch rustbuild to the default build systemAlex Crichton-4/+8
This commit switches the default build system for Rust from the makefiles to rustbuild. The rustbuild build system has been in development for almost a year now and has become quite mature over time. This commit is an implementation of the proposal on [internals] which slates deletion of the makefiles on 2016-01-02. [internals]: https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368 This commit also updates various documentation in `README.md`, `CONTRIBUTING.md`, `src/bootstrap/README.md`, and throughout the source code of rustbuild itself. Closes #37858
2016-11-14rustbuild: Allow configuration of python interpreterAlex Crichton-1/+11
Add a configuration key to `config.toml`, read it from `./configure`, and add auto-detection if none of those were specified. Closes #35760
2016-11-10compiletest: detect nodejs binary, allow overrideMark-Simulacrum-6/+7
Allow passing a custom nodejs directory in configure.