about summary refs log tree commit diff
path: root/src/bootstrap/install.rs
AgeCommit message (Collapse)AuthorLines
2023-10-17move bootstrap core implementation to bootstrap/src/core moduleonur-ozkan-312/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-02ensure the parent path's existence on `x install`onur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-25add sanity checks for user write access on `x install`onur-ozkan-0/+31
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-04-22Group entire build steps in the gha logsOli Scherer-2/+2
2023-03-17Check for llvm-tools before installNagaChaitanya Vellanki-4/+7
2023-02-16Remove save-analysis.Nicholas Nethercote-12/+0
Most tests involving save-analysis were removed, but I kept a few where the `-Zsave-analysis` was an add-on to the main thing being tested, rather than the main thing being tested. For `x.py install`, the `rust-analysis` target has been removed. For `x.py dist`, the `rust-analysis` target has been kept in a degenerate form: it just produces a single file `reduced.json` indicating that save-analysis has been removed. This is necessary for rustup to keep working. Closes #43606.
2022-12-19Don't panic on stable since miri is not available thereOli Scherer-4/+8
2022-12-11bootstrap: Allow installing llvm-toolsMartin Kröning-0/+6
2022-09-21Remove miri from the submodule list and require it for CI to passOli Scherer-7/+4
2022-08-27Sunset RLSEric Huss-9/+0
2022-05-27[bootstrap] Move `sanitize_sh` from `dist` to `install`Joshua Nelson-2/+25
This is the only place it's used, so there's no need for it to be public in another module. In general, `dist` shouldn't ever touch shell scripts.
2022-04-16Require all paths passed to `ShouldRun::paths` to exist on diskJoshua Nelson-14/+14
This has two benefits: 1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components). 2. Bootstrap has better checks for internal consistency. This caught several issues: - `src/sanitizers` doesn't exist; I changed it to just be a `sanitizers` alias. - `src/tools/lld` doesn't exist; I removed it, since `lld` alone already works. - `src/llvm` doesn't exist; removed it since `llvm` and `src/llvm-project` both work. - `src/lldb_batchmode.py` doesn't exist, it was moved to `src/etc`. - `install` was still using `src/librustc` instead of `compiler/rustc`. - None of the tools in `dist` / `install` allowed using `src/tools/X` to build them. This might be intentional - I can change them to aliases if you like.
2022-03-05Merge build_helper into utilbjorn3-1/+1
2022-03-05Remove build_helperbjorn3-1/+1
The majority of the code is only used by either rustbuild or rustc_llvm's build script. Rust_build is compiled once for rustbuild and once for every stage. This means that the majority of the code in this crate is needlessly compiled multiple times. By moving only the code actually used by the respective crates to rustbuild and rustc_llvm's build script, this needless duplicate compilation is avoided.
2021-07-23refactor extended tarball generaton to use the new ensure_if_defaultPietro Albini-1/+1
2021-07-19change output of dist cargo and clippy to be consistent with other toolsPietro Albini-2/+6
2021-07-19refactor gating of dist docsPietro Albini-6/+2
2021-07-12Provide a better error when `x.py install src/doc` doesn't work.Eric Huss-4/+6
2021-07-11Add comments why install steps should never fail.Eric Huss-0/+6
2021-07-09Fix rust-analyzer install when not available.Eric Huss-4/+9
2021-04-16bootstrap: use bash on illumos to run install scriptsJoshua M. Clulow-1/+6
The default illumos shell ("sh" in the default PATH) is ksh93, rather than bash, and does not support constructs like "local" that came from bash. The bootstrap function for invoking "install.sh" scripts should use "bash" explicitly there to avoid issues.
2021-04-03Address review comments and Windows failure, and make cleanerRich Kadel-12/+8
2021-04-03Make rust-demangler installableRich Kadel-0/+20
Adds bootstrap rules to support installing rust-demangler. When compiling with `-Z instrument-coverage`, the coverage reports are generated by `llvm-cov`. `llvm-cov` includes a built-in demangler for C++, and an option to supply an alternate demangler. For Rust, we have `rust-demangler`, currently used in `rustc` coverage tests. Fuchsia's toolchain for Rust is built via `./x.py install`. Fuchsia is adding support for Rust coverage, and we need to include the `rust-demangler` in the installed `bin` directory. Configured rust-demangler as an in-tree extended tool. Added tests to support `./x.py test rust-demangler`. Install with extended tools by default only if `profiler = true`.
2021-02-17avoid converting types into themselves (clippy::useless_conversion)Matthias Krüger-1/+1
2021-02-10bootstrap: fix wrong docs installation pathPietro Albini-1/+1
2021-01-07bootstrap: fix x.py install not working with relative prefixPietro Albini-55/+44
2020-12-31bootstrap: use the correct paths during ./x.py installPietro Albini-75/+31
2020-12-20make sure installer only creates directories in DESTDIRYuxuan Shui-6/+8
Fixes #80238 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-09-24Install std for non-host targetsMark Rousskov-1/+1
2020-07-27mv std libs to library/mark-1/+1
2020-07-19Auto merge of #74495 - shepmaster:bootstrap-dist-target-files, r=Mark-Simulacrumbors-1/+1
Teach bootstrap install and dist commands about TargetSelection With this, we can now use a target JSON file to build a cross-compiler: ``` x.py install --host ../aarch64-apple-darwin.json --target aarch64-apple-darwin ``` r? @Mark-Simulacrum
2020-07-19Teach bootstrap install and dist commands about TargetSelectionJake Goulding-1/+1
With this, we can now use a target JSON file to build a cross-compiler: ``` x.py install --host ../aarch64-apple-darwin.json --target aarch64-apple-darwin ```
2020-07-17Rollup merge of #74457 - Keruspe:install, r=Mark-SimulacrumManish Goregaokar-24/+5
rustbuild: drop tool::should_install Always install when the build succeeds Fixes #74431
2020-07-17rustbuild: drop tool::should_installMarc-Antoine Perennou-24/+5
Always install when the build succeeds Fixes #74431 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-07-17Teach bootstrap about target files vs target triplesJake Goulding-14/+15
`rustc` allows passing in predefined target triples as well as JSON target specification files. This change allows bootstrap to have the first inkling about those differences. This allows building a cross-compiler for an out-of-tree architecture (even though that compiler won't work for other reasons). Even if no one ever uses this functionality, I think the newtype around the `Interned<String>` improves the readability of the code.
2020-07-03Add rust-analyzer submoduleAleksey Kladov-0/+13
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-16bootstrap/install.rs: support a nonexistent `prefix` in `x.py install`NODA, Kai-1/+4
PR #49778 introduced fs::canonicalize() which fails for a nonexistent path. This is a surprise for someone used to GNU Autotools' configure which can create any necessary intermediate directories in prefix. This change makes it run fs::create_dir_all() before canonicalize().
2020-05-02Gate on clippy on CIOliver Scherer-4/+2
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-3/+2
2019-12-01rustbuild: fix cross-compile installXimin Luo-1/+1
although, not sure why this works - it wasn't needed before
2019-09-10Locate rustc binary similarly to codegen backend loadingMark Rousskov-2/+1
This ensures that the failure cases for finding the codegen backend and for finding the rustc binary are essentially the same, and since we almost always will load the codegen backend, this is essentially meaning that the rustc change is not a regression.
2019-06-11Fix x.py installTyler Mandry-1/+4
Make sure we look for save analysis in the right place. Fixes #61703.
2019-05-28Fixup styleAlex Crichton-8/+19
2019-05-28rustbuild: Assert extended builds don't dist too muchAlex Crichton-33/+29
This extends a test in the previous commit to assert that we don't build extra rustc compilers even when the "extended" option is set to true. This involved some internal refactoring to have more judicious usage of `compiler_for`, added in the previous commit, as well. Various `dist::*` targets were refactored to be parameterized with a `Compiler` instead of a `stage`/`host`, and then the various parameters within the `Extended` target were tweaked to ensure that we don't ever accidentally ask for a stage2 build compiler when we're distributing something.
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-0/+2
2019-02-25bootstrap: deny(rust_2018_idioms)Taiki Endo-18/+18
2019-01-08fixupOliver Scherer-1/+1
2019-01-08Prepare everything for distributing miri via rustupOliver Scherer-0/+11
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10bootstrap: fix editionljedrz-4/+4