Commit Graph

168 Commits

Author SHA1 Message Date
Joshua Cotton
34b2072599 Fix bootstrap failing on win32 2020-05-12 10:51:44 -04:00
Joshua Nelson
df36ec0b7e x.py: allow configuring the build directory
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-08 20:33:50 -04:00
Joshua Nelson
9bcf4097e3 x.py: Give a more helpful error message if curl isn't installed
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-05-03 09:39:25 -04:00
Dillon Amburgey
7ac093fda9 Detect git version before attempting to use --progress
Otherwise each update is run twice and errors are printed
2020-04-25 16:30:48 -04:00
lzutao
a39e96407a
Remove CARGO_BUILD_TARGET from bootstrap.py 2020-03-21 21:54:01 +07:00
Chris Simpkins
19aaf63945 PEP8 format spacing 2020-02-07 22:04:44 -05:00
Chris Simpkins
3998249ae7 remove unnecessary local variable assignment in context manager 2020-02-07 22:00:25 -05:00
Mark Rousskov
b613b0cb36 Correctly reinstall rustfmt on channel change 2020-01-31 12:25:14 -05:00
Adam Perry
72a844dee7 bootstrap.py fetches rustfmt.
Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
2019-12-21 20:23:39 -05:00
Ximin Luo
0533249fd7 rustbuild: don't clobber RUSTFLAGS, append to it 2019-12-01 00:53:25 +00:00
Guanqun Lu
0019371e3d bootstrap: don't call support_xz in hot-path 2019-11-12 00:16:05 +08:00
Guanqun Lu
8d56bcc59c download .tar.xz if python3 is used 2019-11-10 16:34:31 +08:00
Alex Crichton
c7d285b781 Remove src/llvm-emscripten submodule
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-10-21 13:05:31 -07:00
Guanqun Lu
b117bd7366 check git in bootstrap.py when trying to update submodule 2019-09-09 22:28:57 +08:00
Guanqun Lu
85e09c6531 use 'get_toml' instead of regular expression 2019-09-09 00:21:05 +08:00
Mazdak Farrokhzad
3c4a586221
Rollup merge of #64098 - Mark-Simulacrum:always-warn, r=alexcrichton
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-07 20:01:43 +02:00
Guanqun Lu
ba7d1b80d0 it's more pythonic to use 'is not None' in python files 2019-09-06 15:14:25 +08:00
Mark Rousskov
c86ea34639 Ensure all warnings are emitted even on warnings=warn 2019-09-04 14:21:35 -04:00
Mazdak Farrokhzad
78e728e2c2
Rollup merge of #63953 - crlf0710:bootstrap_mirroring, r=Mark-Simulacrum
bootstrap: allow specifying mirror for bootstrap compiler download.
2019-08-29 17:13:59 +02:00
Charles Lew
c9bf5c0bff bootstrap: allow specifying mirror for bootstrap compiler download. 2019-08-28 00:47:12 +08:00
Marc-Antoine Perennou
935c1c8607 rustbuild: allow disabling deny(warnings) for bootstrap
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-08-27 17:26:54 +02:00
Eric Huss
06c3256a6b Update cargo-vendor usage 2019-07-09 16:12:41 -07:00
Marcel Hellwig
cc314b066a Remove bitrig support from rust 2019-05-13 11:09:06 +02:00
Nathan Froyd
a0d63354f2 intelligently handle older version of git in bootstrap
If we fail to run with `--progress`, try running without instead.

Fixes #57080.
2019-04-29 17:01:42 -04:00
Pietro Albini
19e39cb9cb
Rollup merge of #58080 - MikaelUrankar:freebsd_arm, r=sanxiyn
Add FreeBSD armv6 and armv7 targets
2019-03-08 09:41:36 +01:00
varkor
890ef48eb9 Fix an indexing error when using x.py help 2019-02-23 18:57:25 +00:00
MikaelUrankar
adddee4946 Add FreeBSD armv6 and armv7 targets 2019-02-13 12:19:50 +01:00
Josh Stone
df0466d0bb Rebase to the llvm-project monorepo
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-25 15:39:54 -08:00
lenoil98
c2863dd1b4
Update bootstrap.py
Add PowerPC64 support on FreeBSD
2019-01-17 13:20:00 -05:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Matthias Krüger
49eb1e5419 x.py: fixup 6130fc884b
./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-24 20:23:00 +01:00
Clar Fon
6130fc884b Add --progress to git submodule commands 2018-12-17 17:19:22 -05:00
Eduard-Mihai Burtescu
7c166f54b2 Move Cargo.{toml,lock} to the repository root directory. 2018-11-22 12:10:04 +02:00
Dan Robertson
c211238180
Fix TLS errors when downloading stage0 2018-11-12 02:35:44 +00:00
Alex Crichton
61e89446ef Remove all jemalloc-related content
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-11-02 06:52:56 -07:00
Marc-Antoine Perennou
bc87c71d86 rustbuild: use configured linker to build boostrap
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-10-26 10:18:48 +02:00
Matthias Krüger
4972beaf65 fix typos in various places 2018-10-23 15:56:25 +02:00
Collins Abitekaniza
f9375674df allow use of ./x.py help <cmd> ... 2018-10-01 04:06:58 +03:00
Tom Tromey
6e3a4f4ddd Add lldb to the build
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-08-14 18:59:23 -06:00
kennytm
2994b27e40
Add timeout to use of curl in bootstrap.py. 2018-07-30 12:06:22 +08:00
NODA, Kai
97d0bc3f04
bootstrap: our best to achieve atomic rename on Win32
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-10 22:50:20 +08:00
NODA, Kai
bcb8a06ef7 bootstrap: write texts to a .tmp file first for atomicity
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-10 22:50:00 +08:00
Nikolai Merinov
ddc1d29442 bootstrap: tests should use rustc from config.toml
Tests should always use "rustc" and "cargo" from config.toml instead
of assuming that stage0 binaries was downloaded to build directory.
2018-07-02 21:28:58 +05:00
Oliver Schneider
824c5dfa61 Also run the bootstrap in bootstrap mode 2018-07-01 01:50:12 +02:00
Johannes Nixdorf
bcab14af3e bootstrap.py: respect crt-static
Bootstrap requires serde_derive, which needs proc-macro crate types, so
it won't work with crt-static.
2018-05-31 12:01:50 +02:00
Alex Crichton
acc874fbcd Revert "bootstrap.py: respect crt-static"
This reverts commit 5ecf29df05.
2018-05-17 10:37:22 -07:00
Johannes Nixdorf
5ecf29df05 bootstrap.py: respect crt-static
Bootstrap requires serde_derive, which needs proc-macro crate types, so
it won't work with crt-static.
2018-04-29 11:30:56 +02:00
Tatsuyuki Ishi
4c51d47269
bootstrap: Remove the fast path
This is rarely noticed, but when you have old submodules, not updating them will cause you run into https://github.com/rust-lang/cargo/issues/4678.
2018-04-06 16:23:53 +09:00
Mark Simulacrum
84b5b34021 Stop accessing current_dir in bootstrap
This ensures that the working directory of rustbuild has no effect on
it's run; since tests will run with a different cwd this is required for
consistent behavior.
2018-04-03 11:39:15 -06:00
Petr Hosek
a24811e15a Handle fast-submodules option correctly
This option was introduced in 72cb109bec, but it uses two different
spellings (fast-submodule vs fast-submodules) and isn't handled by
Rust bootstrap which means that any attempt to set this flag fails.
2018-03-30 16:42:57 -07:00