about summary refs log tree commit diff
path: root/src/bootstrap/build.rs
AgeCommit message (Collapse)AuthorLines
2022-02-26avoid rebuilding bootstrap when PATH changesRalf Jung-1/+1
2022-02-06Rerun bootstrap's build script when RUSTC changesJoshua Nelson-0/+2
Previously, rustbuild would give strange errors if you tried to reuse the same build directory under two names: ``` $ mkdir tmp && cd tmp $ ../x.py check Building rustbuild Finished dev [unoptimized] target(s) in 35.27s Checking stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) ^C $ cd .. $ mv tmp/build build $ ./x.py check Building rustbuild Compiling bootstrap v0.0.0 (/home/jnelson/rust-lang/rust/src/bootstrap) Finished dev [unoptimized] target(s) in 11.18s failed to execute command: "/home/jnelson/rust-lang/rust/tmp/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "--target" "x86_64-unknown-linux-gnu" "--print" "target-libdir" error: No such file or directory (os error 2) ``` This fixes the error. Reusing the same build directory is useful if you want to test path-things in bootstrap itself, without having to recompile it each time. For good measure, this also reruns the build script when PATH changes.
2020-09-20Discover Rust toolchain without PythonMark Rousskov-1/+24
2020-09-20Set BUILD_TRIPLE via build scriptMark Rousskov-0/+3
This moves build triple discovery for rustbuild from bootstrap.py into a build script, meaning it will "just work" if building rustbuild via Cargo rather than Python.