about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
AgeCommit message (Collapse)AuthorLines
2020-07-17bootstrap.py: patch RPATH on NixOS to handle the new zlib dependency.Eduard-Mihai Burtescu-13/+30
2020-07-17bootstrap.py: guard against GC in NixOS patching support.Eduard-Mihai Burtescu-31/+42
2020-07-03Add rust-analyzer submoduleAleksey Kladov-1/+1
The current plan is that submodule tracks the `release` branch of rust-analyzer, which is updated once a week. rust-analyzer is a workspace (with a virtual manifest), the actual binary is provide by `crates/rust-analyzer` package. Note that we intentionally don't add rust-analyzer to `Kind::Test`, for two reasons. *First*, at the moment rust-analyzer's test suite does a couple of things which might not work in the context of rust repository. For example, it shells out directly to `rustup` and `rustfmt`. So, making this work requires non-trivial efforts. *Second*, it seems unlikely that running tests in rust-lang/rust repo would provide any additional guarantees. rust-analyzer builds with stable and does not depend on the specifics of the compiler, so changes to compiler can't break ra, unless they break stability guarantee. Additionally, rust-analyzer itself is gated on bors, so we are pretty confident that test suite passes.
2020-06-25Bootstrap: fallback detection of WindowsAndrew Paverd-0/+6
2020-06-22bootstrap: no `config.toml` exists regressionDavid Wood-5/+9
This commit fixes a regression introduced in #73317 where an oversight meant that `config.toml` was assumed to exist. Signed-off-by: David Wood <david@davidtw.co>
2020-06-16bootstrap: read config from $RUST_BOOTSTRAP_CONFIGDavid Wood-1/+2
This commit modifies bootstrap so that `config.toml` is read first from `RUST_BOOTSTRAP_CONFIG`, then `--config` and finally `config.toml` in the current directory. This is a subjective change, intended to improve the ergnomics when using "development shells" for rustc development (for example, using tools such as Nix) which set environment variables to ensure a reproducible environment (these development shells can then be version controlled). By optionally reading `config.toml` from an environment variable, a `config.toml` can be defined in the development shell and a path to it exposed in the `RUST_BOOTSTRAP_CONFIG` environment variable - avoiding the need to manually symlink the contents of this file to `config.toml` in the working directory. Signed-off-by: David Wood <david@davidtw.co>
2020-05-12Fix bootstrap failing on win32Joshua Cotton-3/+6
2020-05-08x.py: allow configuring the build directoryJoshua Nelson-2/+9
This allows configuring the directory for build artifacts, instead of having it always be ./build. This means you can set it to a constant location, letting you reuse the same cache while working in several different directories. The configuration lives in config.toml under build.build-dir. By default, it keeps the existing default of ./build, but it can be configured to any relative or absolute path. Additionally, it allows making outputs relative to the root of the git repository using $ROOT.
2020-05-03x.py: Give a more helpful error message if curl isn't installedJoshua Nelson-23/+25
This also abstracts checking for a command into `require`. Before: ``` Updating only changed submodules Submodules updated in 0.01 seconds Traceback (most recent call last): File "./x.py", line 11, in <module> bootstrap.main() ... File "/home/joshua/src/rust/src/bootstrap/bootstrap.py", line 137, in run ret = subprocess.Popen(args, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory ``` After: ``` error: unable to run `curl --version`: [Errno 2] No such file or directory Please make sure it's installed and in the path. ```
2020-04-25Detect git version before attempting to use --progressDillon Amburgey-11/+15
Otherwise each update is run twice and errors are printed
2020-03-21Remove CARGO_BUILD_TARGET from bootstrap.pylzutao-0/+4
2020-02-07PEP8 format spacingChris Simpkins-4/+3
2020-02-07remove unnecessary local variable assignment in context managerChris Simpkins-1/+1
2020-01-31Correctly reinstall rustfmt on channel changeMark Rousskov-4/+4
2019-12-21bootstrap.py fetches rustfmt.Adam Perry-3/+42
Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
2019-12-01rustbuild: don't clobber RUSTFLAGS, append to itXimin Luo-5/+7
2019-11-12bootstrap: don't call support_xz in hot-pathGuanqun Lu-21/+22
2019-11-10download .tar.xz if python3 is usedGuanqun Lu-9/+23
2019-10-21Remove `src/llvm-emscripten` submoduleAlex Crichton-4/+0
With #65251 landed there's no need to build two LLVM backends and ship them with rustc, every target we have now uses the same LLVM backend! This removes the `src/llvm-emscripten` submodule and additionally removes all support from rustbuild for building the emscripten LLVM backend. Multiple codegen backend support is left in place for now, and this is intended to be an easy 10-15 minute win on CI times by avoiding having to build LLVM twice.
2019-09-09check git in bootstrap.py when trying to update submoduleGuanqun Lu-0/+8
2019-09-09use 'get_toml' instead of regular expressionGuanqun Lu-5/+15
2019-09-07Rollup merge of #64098 - Mark-Simulacrum:always-warn, r=alexcrichtonMazdak Farrokhzad-1/+2
Ensure edition lints and internal lints are enabled with deny-warnings=false Previously we only passed the deny command line flags if deny-warnings was enabled, but now we either pass -W... or -D... for each of the flags as appropriate. This is also a breaking change to x.py as it changes `--warnings=allow` to `--warnings=warn` which is what that flag actually did; we don't have an allow warnings mode.
2019-09-06it's more pythonic to use 'is not None' in python filesGuanqun Lu-1/+1
2019-09-04Ensure all warnings are emitted even on warnings=warnMark Rousskov-1/+2
2019-08-29Rollup merge of #63953 - crlf0710:bootstrap_mirroring, r=Mark-SimulacrumMazdak Farrokhzad-2/+14
bootstrap: allow specifying mirror for bootstrap compiler download.
2019-08-28bootstrap: allow specifying mirror for bootstrap compiler download.Charles Lew-2/+14
2019-08-27rustbuild: allow disabling deny(warnings) for bootstrapMarc-Antoine Perennou-0/+2
When deny-warnings is not specified or set to true, the behaviour is the same as before. When deny-warnings is set to false, warnings are now allowed Fixes #63911 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2019-07-09Update cargo-vendor usageEric Huss-24/+43
2019-05-13Remove bitrig support from rustMarcel Hellwig-1/+0
2019-04-29intelligently handle older version of git in bootstrapNathan Froyd-3/+9
If we fail to run with `--progress`, try running without instead. Fixes #57080.
2019-03-08Rollup merge of #58080 - MikaelUrankar:freebsd_arm, r=sanxiynPietro Albini-0/+4
Add FreeBSD armv6 and armv7 targets
2019-02-23Fix an indexing error when using `x.py help`varkor-1/+1
2019-02-13Add FreeBSD armv6 and armv7 targetsMikaelUrankar-0/+4
2019-01-25Rebase to the llvm-project monorepoJosh Stone-10/+2
The new git submodule src/llvm-project is a monorepo replacing src/llvm and src/tools/{clang,lld,lldb}. This also serves as a rebase for these projects to the new 8.x branch from trunk. The src/llvm-emscripten fork is unchanged for now.
2019-01-17Update bootstrap.pylenoil98-0/+3
Add PowerPC64 support on FreeBSD
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-24x.py: fixup 6130fc884bc1dff9bb835894a7bb2042c110b011Matthias Krüger-1/+1
./x.py used to automatically check out the right commit when a submodule was outdated and ./x.py build was run and submodules handling was enabled in config.toml (submodules = true). But it threw an error: [...] failed to run: git submodule -q sync --progress src/tools/clippy The commit removes the --progress from git submodule call. Fixes #57080
2018-12-17Add --progress to git submodule commandsClar Fon-2/+2
2018-11-22Move Cargo.{toml,lock} to the repository root directory.Eduard-Mihai Burtescu-1/+1
2018-11-12Fix TLS errors when downloading stage0Dan Robertson-2/+2
2018-11-02Remove all jemalloc-related contentAlex Crichton-5/+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-26rustbuild: use configured linker to build boostrapMarc-Antoine Perennou-0/+3
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-10-23fix typos in various placesMatthias Krüger-1/+1
2018-10-01allow use of ./x.py help <cmd> ...Collins Abitekaniza-0/+5
2018-08-14Add lldb to the buildTom Tromey-0/+4
This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-07-30Add timeout to use of `curl` in bootstrap.py.kennytm-1/+4
2018-07-10bootstrap: our best to achieve atomic rename on Win32NODA, Kai-1/+6
This is a tricky operation to implement on Win32; see https://ci.appveyor.com/project/nodakai/python-win-behavior Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-07-10bootstrap: write texts to a .tmp file first for atomicityNODA, Kai-3/+11
If you are using a hard-linked file as your config.toml, this change will affect the way other instances of the file is modified. The original version would modify all other instances whereas the new version will leave others unchanged, reducing the ref count by one. Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-07-02bootstrap: tests should use rustc from config.tomlNikolai Merinov-0/+2
Tests should always use "rustc" and "cargo" from config.toml instead of assuming that stage0 binaries was downloaded to build directory.
2018-07-01Also run the bootstrap in bootstrap modeOliver Schneider-0/+1