Commit Graph

13 Commits

Author SHA1 Message Date
Trevor Gross
cec95d74dd Add deprecation warning for python <3.6 in x.py
Soft deprecate old python versions to give users a warning that
eventually it may not be supported.
2023-06-09 23:56:12 -04:00
Albert Larsan
30119498be
Make x.py work again in most (all?) cases
Wrap all of x.py in `if __name__ == '__main__':` to avoid problems with `multiprocessing`
Make the pool sizing better
2023-05-01 16:20:45 +00:00
KaDiWa
043c634a9c
assert that should_fix_bins_and_dylibs has been run 2023-01-31 18:22:01 +01:00
KaDiWa
385dbff9e5
bootstrap script: slight cleanup 2023-01-30 15:58:35 +01:00
Josh Stone
de8dedb0a5 Use an extensionless x script for non-Windows 2022-08-12 15:39:26 -07:00
Joshua Nelson
775c3c0493 Add x.sh and x.ps1 shell scripts
This is a more ambitious version of https://github.com/rust-lang/rust/pull/98716.
It still changes the shebang back to python3, for compatibility with non-Unix systems,
but also adds alternative entrypoints for systems without `python3` installed.

These scripts will be necessary for the rust entrypoint (#94829), so I see
little downside in adding them early.
2022-08-08 14:48:11 -05:00
David Tolnay
9169905eb2
x.py: Support systems with only python3 not python 2022-06-24 18:03:09 -07:00
Joshua Nelson
c8cac2a2c1 Choose the version of python at runtime (portable version)
- Try `py -3` first for windows compatibility
- Fall back to `python3` if `py` doesn't work
2021-01-14 21:00:42 -05:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Titus Barik
04e4d426a1 Rename os variable in bootstrap.py to avoid shadowing os module. 2017-04-30 16:10:31 -04:00
Vadim Petrochenkov
11adac350b bootstrap.py: Report build status
Move some code from x.py to bootstrap.py
2017-03-04 21:38:26 +03:00
Abhishek Chanda
b7cd840dd7 Handle Ctrl+C in the build script 2016-12-11 15:25:31 +00:00
Alex Crichton
a270b8014c rustbuild: Rewrite user-facing interface
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-11-02 17:57:28 -07:00