about summary refs log tree commit diff
path: root/src/bootstrap/flags.rs
AgeCommit message (Collapse)AuthorLines
2017-09-20Do not show "available paths" help in ./x.py cleanTommy Ip-5/+6
2017-09-20Add --all flag to ./x.py cleanTommy Ip-2/+8
This flag removes all build artifacts, including the LLVM build directory.
2017-08-27Fail ./x.py on invalid commandMichal 'vorner' Vaner-1/+1
Make the ./x.py script fail when run with an invalid command, like: ./x.py nonsense This helps in case of chaining multiple runs, eg.: ./x.py biuld && ./x.py test
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-7/+7
Like #43008 (f668999), but _much more aggressive_.
2017-08-13Allow overriding build triple via flag.Mark Simulacrum-4/+2
We first check the configuration, then passed parameters (--build), then fall back to the auto-detection that bootstrap.py does. Fixes #39673.
2017-08-13Unify flags into config.Mark Simulacrum-4/+11
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-20Implement available paths list.Mark Simulacrum-5/+3
2017-07-20Utilize interning to allow Copy/Clone stepsMark Simulacrum-7/+11
2017-07-20Fixes warnings and errors introduced while moving code aroundMark Simulacrum-5/+6
2017-07-04Store verbosity on BuildMark Simulacrum-10/+0
Prevents accidental mistakes in not using the right verbosity by going to only config or flags.
2017-07-04Store positive instead of negative fail_fast.Mark Simulacrum-4/+4
This makes later negation much easier to interpret.
2017-07-04Clarify meaning of Build.cargo, Build.rustc.Mark Simulacrum-2/+7
Rename Build.{cargo, rustc} to {initial_cargo, initial_rustc}.
2017-07-04Clippy lintsMark Simulacrum-4/+2
2017-07-04Clean up and restructure sanity checking.Mark Simulacrum-1/+1
2017-07-04Don't allocate args in order to run find.Mark Simulacrum-10/+9
2017-06-16Use custom cargo/rustc paths when parsing flags.Mark Simulacrum-9/+8
2017-06-07bootstrap: further clarify build --helpRalf Jung-2/+3
2017-06-06bootstrap: improve 'build --help' by explaining what exactly the last ↵Ralf Jung-1/+5
example does
2017-06-02rustbuild: Add `./x.py test --no-fail-fast`Josh Stone-1/+13
This option forwards to each `cargo test` invocation, and applies the same logic across all test steps to keep going after failures. At the end, a brief summary line reports how many commands failed, if any. Note that if a test program fails to even start at all, or if an auxiliary build command related to testing fails, these are still left to stop everything right away. Fixes #40219.
2017-05-22rustbuild: split Install out of Dist subcommandMarc-Antoine Perennou-5/+12
only create source tarball for the Dist subcommand mark install rule as default for Kind::Install split install-docs split install-std factor out empty_dir handling split install-cargo split install-analysis split install-src rework install-rustc properly handle cross-compilation setups for install use pkgname in install split plain source tarball generation from rust-src dist document src-tarball in config.toml.exmaple Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-04Branch arms need to match the return value even if it's not being assigned ↵Nathan Stocks-4/+4
to anything
2017-04-03Handle options-with-arguments before subcommands such as './x.py -j 10 ↵Nathan Stocks-16/+44
build' and detect pathological cases like './x.py --option-that-takes-argument clean build'
2017-04-02Fix breaking the 'clean' subcommand caused replacing a single-letter ↵Nathan Stocks-1/+1
variable with the same value in two contexts where it was used differently. That's why you don't use "m" as a variable for hundreds of lines in an outer function, and re-use it in closures several times in the same function. Sheesh.
2017-04-02Simplify a "use" statement as per @grunweg's feedback.Nathan Stocks-1/+1
2017-04-02Oops, we can't parse options until all options have been defined. Tiny bit ↵Nathan Stocks-15/+23
of manual arg-parsing. Fixed tidy stuff too.
2017-04-02Finish the improvements I planned.Nathan Stocks-117/+105
- No more manual args manipulation -- getopts used for everything. As a result, options can be in any position, now, even before the subcommand. - The additional options for test, bench, and dist now appear in the help output. - No more single-letter variable bindings used internally for large scopes. - Don't output the time measurement when just invoking 'x.py' - Logic is now much more linear. We build strings up, and then print them.
2017-04-02Save my TODO's as comments, so I don't forget.Nathan Stocks-0/+2
2017-04-02Using an untyped, one-letter variable binding as an argument to a function ↵Nathan Stocks-2/+2
and then not using it until over 100 lines later is just mean.
2017-04-02Vastly improve the help output.Nathan Stocks-27/+26
- Don't print 'unknown subcommand' at the top of the help message. The help message now clearly instructs the user to provide a subcommand. - Clarify the usage line. Subcommand is required. Don't echo invalid input back out in the usage line (what the...???). args renamed to paths, because that's what all the args are referred to elsewhere. - List the available subcommands immediately following the usage line. It's the one required argument, after all. - Slightly improve the extra documentation for the build, test, and doc commands. - Don't print 'Available invocations:' at all. It occurred immediately before 'Available paths:'. - Clearly state that running with '-h -v' will produce a list of available paths.
2017-03-30When dealing with the list of all possible subcommands, deal with them in ↵Nathan Stocks-7/+7
the same order to ease comparing the sections of code in order. I chose the order that appears in the help text, because that is most likely to have been ordered with specific reasoning.
2017-03-30Refer to a subcommand as a subcommand.Nathan Stocks-16/+15
For some reason 'command' and 'subcommand' were intermixed to mean the same thing. Lets just call it the one thing that it is.
2017-02-16[rustbuild] add a way to run command after failureSimonas Kazlauskas-0/+3
This is a simple way to workaround the debugging issues caused by the rustc wrapper used in the bootstrap process. Namely, it uses some obscure environment variables and you can’t just copy the failed command and run it in the shell or debugger to examine the failure more closely. With `--on-fail` its possible to run an arbitrary command within exactly the same environment under which rustc failed. Theres’s multiple ways to use this new flag: $ python x.py build --stage=1 --on-fail=env would print a list of environment variables and the failed command, so a few copy-pastes and you now can run the same rust in your shell outside the bootstrap system. $ python x.py build --stage=1 --on-fail=bash Is a more useful variation of the command above in that it launches a whole shell with environment already in place! All that’s left to do is copy-paste the command just above the shell prompt! Fixes #38686 Fixes #38221
2017-01-16travis: Expand the `cross` linux imageAlex Crichton-2/+6
This expands the `cross` travis matrix entry with a few more targets that our nightlies are building: * x86_64-rumprun-netbsd * arm-unknown-linux-musleabi * arm-unknown-linux-musleabihf * armv7-unknown-linux-musleabihf * mips-unknown-linux-musl * mipsel-unknown-linux-musl This commit doesn't compile custom toolchains like our current cross-image does, but instead compiles musl manually and then compiles libunwind manually (like x86_64) for use for the ARM targets and just uses openwrt toolchains for the mips targets.
2017-01-12travis: Start uploading artifacts on commitsAlex Crichton-0/+2
This commit starts adding the infrastructure for uploading release artifacts from AppVeyor/Travis on each commit. The idea is that eventually we'll upload a full release to AppVeyor/Travis in accordance with plans [outlined earlier]. Right now this configures Travis/Appveyor to upload all tarballs in the `dist` directory, and various images are updated to actually produce tarballs in these directories. These are nowhere near ready to be actual release artifacts, but this should allow us to play around with it and test it out. Once this commit lands we should start seeing artifacts uploaded on each commit. [outlined earlier]: https://internals.rust-lang.org/t/rust-ci-release-infrastructure-changes/4489
2016-12-20rustbuild: Deny and fix warningsAlex Crichton-1/+1
Turned out this lint uncovered an actual bug! Closes #38484
2016-12-19add and document `--incremental` flag along with misc other changesNiko Matsakis-3/+26
For example: - we now support `-vv` to get very verbose output. - RUSTFLAGS is respected by `x.py` - better error messages for some cases
2016-12-15Auto merge of #38331 - bluss:assume-stage, r=alexcrichtonbors-0/+3
rustbuild: Add cli option --keep-stage This option is intended to be used like: ./x.py build --stage 1 --keep-stage 0 Which skips all stage 0 steps, so that stage 1 can be recompiled directly (even if for example libcore has changes). This is useful when working on `cfg(not(stage0))` parts of the libraries or when re-running stage 1 tests in libraries in general. Fixes #38326
2016-12-14Document --test-args for rustbuildSeo Sanghyeon-1/+0
2016-12-13rustbuild: Add cli option --keep-stageUlrik Sverdrup-0/+3
This option is intended to be used like: ./x.py build --stage 1 --keep-stage 0 Which skips all stage 0 steps, so that stage 1 can be recompiled directly (even if for example libcore has changes). This is useful when working on `cfg(not(stage0))` parts of the libraries, or when re-running stage 1 tests in libraries in general.
2016-12-07mk: Switch rustbuild to the default build systemAlex Crichton-0/+1
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-25rustbuild: Add bench subcommandUlrik Sverdrup-1/+16
Add command `./x.py bench`; use `./x.py bench --help -v` to list all available benchmark targets.
2016-11-02rustbuild: Rewrite user-facing interfaceAlex Crichton-37/+202
This commit is a rewrite of the user-facing interface to the rustbuild build system. The intention here is to make it much easier to compile/test the project without having to remember weird rule names and such. An overall view of the new interface is: # build everything ./x.py build # document everyting ./x.py doc # test everything ./x.py test # test libstd ./x.py test src/libstd # build libcore stage0 ./x.py build src/libcore --stage 0 # run stage1 run-pass tests ./x.py test src/test/run-pass --stage 1 The `src/bootstrap/bootstrap.py` script is now aliased as a top-level `x.py` script. This `x` was chosen to be both short and easily tab-completable (no collisions in that namespace!). The build system now accepts a "subcommand" of what to do next, the main ones being build/doc/test. Each subcommand then receives an optional list of arguments. These arguments are paths in the source repo of what to work with. That is, if you want to test a directory, you just pass that directory as an argument. The purpose of this rewrite is to do away with all of the arcane renames like "rpass" is the "run-pass" suite, "cfail" is the "compile-fail" suite, etc. By simply working with directories and files it's much more intuitive of how to run a test (just pass it as an argument). The rustbuild step/dependency management was also rewritten along the way to make this easy to work with and define, but that's largely just a refactoring of what was there before. The *intention* is that this support is extended for arbitrary files (e.g. `src/test/run-pass/my-test-case.rs`), but that isn't quite implemented just yet. Instead directories work for now but we can follow up with stricter path filtering logic to plumb through all the arguments.
2016-07-05rustbuild: Remove the `build` directoryAlex Crichton-0/+103
The organization in rustbuild was a little odd at the moment where the `lib.rs` was quite small but the binary `main.rs` was much larger. Unfortunately as well there was a `build/` directory with the implementation of the build system, but this directory was ignored by GitHub on the file-search prompt which was a little annoying. This commit reorganizes rustbuild slightly where all the library files (the build system) is located directly inside of `src/bootstrap` and all the binaries now live in `src/bootstrap/bin` (they're small). Hopefully this should allow GitHub to index and allow navigating all the files while maintaining a relatively similar layout to the other libraries in `src/`.