about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2020-10-29Create config.toml in the current directory, not the top-level directoryJoshua Nelson-1/+1
See https://github.com/rust-lang/rust/issues/78509 for discussion.
2020-10-27Rollup merge of #77703 - Keruspe:system-libunwind, r=Mark-SimulacrumYuki Okushi-7/+38
add system-llvm-libunwind config option allows using the system-wide llvm-libunwind as the unwinder Workaround for #76020
2020-10-26Auto merge of #77975 - bjorn3:cg_clif_subtree3, r=Mark-Simulacrumbors-8/+288
Add cg_clif as optional codegen backend Rustc_codegen_cranelift is an alternative codegen backend for rustc based on Cranelift. It has the potential to improve compilation times in debug mode. In my experience the compile time improvements over debug mode LLVM for a clean build are about 20-30% in most cases. This PR adds cg_clif as optional codegen backend. By default it is only enabled for `./x.py check`. It can be enabled for `./x.py build` too by adding `cranelift` to the `rust.codegen-backends` array in `config.toml`. MCP: https://github.com/rust-lang/compiler-team/issues/270 r? `@Mark-Simulacrum`
2020-10-26Add support for using cg_clif to bootstrap rustcbjorn3-8/+288
2020-10-25Auto merge of #77901 - jonas-schievink:unignore-test-36710, r=Mark-Simulacrumbors-2/+3
Unignore test for #36710 on MUSL This now works fine thanks to autodetected `-C link-self-contained`. Closes #36710
2020-10-23x.py test --test-args flag description enhancementNelson J Morais-1/+7
2020-10-23Rollup merge of #78153 - est31:downloaded_llvm_maybe_sync, r=Mark-SimulacrumYuki Okushi-1/+6
Sync LLVM submodule if it has been initialized Since having enabled the download-ci-llvm option, and having rebased on top of #76864, I've noticed that I had to update the llvm-project submodule manually if it was checked out. Orignally, the submodule update logic was introduced to reduce the friction for contributors to manage the submodules, or in other words, to prevent getting PRs that have unwanted submodule rollbacks because the contributors didn't run git submodule update. This commit adds logic to ensure there is no inadvertent LLVM submodule rollback in a PR if download-ci-llvm (or llvm-config) is enabled. It will detect whether the llvm-project submodule is initialized, and if so, update it in any case. If it is not initialized, behaviour is kept to not do any update/initialization. An alternative to the chosen implementation would be to not pass the --init command line arg to `git submodule update` for the src/llvm-project submodule. This would show a confusing error message however on all builds with an uninitialized repo. We could pass the --silent param, but we still want it to print something if it is initialized and has to update something. So we just do a manual check for whether the submodule is initialized.
2020-10-22Auto merge of #78131 - SimonSapin:ar, r=Mark-Simulacrumbors-3/+16
Package more llvm-* tools in the rust-dev component, for run-make-fulldeps tests Fixes https://github.com/rust-lang/rust/issues/78110
2020-10-22Rollup merge of #78009 - nielx:fix/CMAKE_SYSTEM_NAME, r=Mark-SimulacrumYuki Okushi-0/+2
Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling This resolves issues where the cross-build of LLVM fails because it tries to link to the host's system libraries instead of the target's system libraries.
2020-10-21allow using the system-wide llvm-libunwind as the unwinderMarc-Antoine Perennou-7/+38
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-10-20Sync LLVM submodule if it has been initializedest31-1/+6
Since having enabled the download-ci-llvm option, and having rebased on top of f05b47ccdfa63f8b4b9fb47a9aa92381801d3ff1, I've noticed that I had to update the llvm-project submodule manually if it was checked out. Orignally, the submodule update logic was introduced to reduce the friction for contributors to manage the submodules, or in other words, to prevent getting PRs that have unwanted submodule rollbacks because the contributors didn't run git submodule update. This commit adds logic to ensure there is no inadvertent LLVM submodule rollback in a PR if download-ci-llvm (or llvm-config) is enabled. It will detect whether the llvm-project submodule is initialized, and if so, update it in any case. If it is not initialized, behaviour is kept to not do any update/initialization. An alternative to the chosen implementation would be to not pass the --init command line arg to `git submodule update` for the src/llvm-project submodule. This would show a confusing error message however on all builds with an uninitialized repo. We could pass the --silent param, but we still want it to print something if it is initialized and has to update something. So we just do a manual check for whether the submodule is initialized.
2020-10-20Make users of `download-ci-llvm` download a new versionSimon Sapin-1/+7
2020-10-20Package more llvm-* tools in the rust-dev component, for run-make-fulldeps testsSimon Sapin-2/+9
Fixes https://github.com/rust-lang/rust/issues/78110
2020-10-20Rollup merge of #77778 - jyn514:git-hook, r=mark-simulacrumYuki Okushi-3/+11
[x.py setup] Allow setting up git hooks from other worktrees Closes https://github.com/rust-lang/rust/issues/77684 r? @caass
2020-10-19bootstrap: configure native toolchain for run-makeJonas Schievink-1/+1
This allows moving a lot of run-make-fulldeps tests to just run-make tests, and allows running those on target-only platforms
2020-10-19bootstrap: fall back to auto-detected CXXJonas Schievink-1/+2
This allows us to use the C++ compiler configured via `CXX_target_triple` env vars
2020-10-18bootstrap: Print units for "finished in xxx" messageCamelid-1/+1
It now says "finished in xxx seconds". Also slightly improved some wording in the README.
2020-10-18Rollup merge of #76607 - Mark-Simulacrum:tidy-bins, r=pnkfelixYuki Okushi-0/+1
Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general. Supersedes #74753.
2020-10-16Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compilingNiels Sascha Reedijk-0/+2
This resolves issues where the cross-build of LLVM fails because it tries to link to the host's system libraries instead of the target's system libraries.
2020-10-15Auto merge of #77756 - alarsyo:setup-llvm-detect, r=jyn514bors-4/+32
Detect configuration for LLVM during setup This is a first draft to address #77579, setting `download-ci-llvm` to true on Linux, but I could also implement the `if-available` setting mentioned in the issue. On other platforms I was thinking about using [the which crate](https://crates.io/crates/which), if adding a dependency on it is considered okay of course, to detect the presence of `llvm-config` in the path, and use it if found. Still a work in progress of course.
2020-10-14x.py setup: Avoid infinite loop if stdin is /dev/nullIan Jackson-0/+4
EOF is not an error; it just causes read_line to produce "". Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py setup: Fix handling of wrong interactive inputIan Jackson-1/+1
We need a fresh input buffer each time, or we reuse the previous data (since `read_line` appends). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py: setup: Offer keywords in interactive promptIan Jackson-2/+2
We understand these profile names because we use .to_str(). Mention them in the question. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py: setup: Provide a description of what it doesIan Jackson-3/+10
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-10-14x.py: setup: Refactor to centralise list of profilesIan Jackson-17/+51
Put all()'s otuput in the order we want to print things in, and add a comment about why they are in this order. Provide purpose() and all_for_help(). Use these things everywhere. Move all the abbrev character ("a", "b", etc.) processing into interactive_path. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14Rollup merge of #77829 - gburgessiv:unused-features-var, r=alexcrichtonDylan DPC-5/+5
bootstrap: only use compiler-builtins-c if they exist The assignment of `features` above was added in rust-lang#60981, but never used. Presumably the intent was to replace the string literal here with it. While I'm in the area, `compiler_builtins_c_feature` doesn't need to be a `String`. I'm not entirely sure of a great way to locally test this -- `./x.py test` passed on my machine, but 🤷‍♂️. r? @alexcrichton
2020-10-14Rollup merge of #77909 - pietroalbini:fix-build-manifest-path, r=Mark-SimulacrumYuki Okushi-1/+1
bootstrap: set correct path for the build-manifest binary This changes the path of the binary inside the tarball to be: ``` build-manifest-{release}-{target}/build-manifest/bin/build-manifest ``` ...instead of: ``` build-manifest-{release}-{target}/build-manifest/bin/build-manifest/build-manifest ``` r? @Mark-Simulacrum
2020-10-14Rollup merge of #77868 - Aaron1011:llvm-tools-opt-llc, r=Mark-SimulacrumYuki Okushi-0/+3
Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component Fixes #55890 It's useful to have `llc` and `opt` available when debugging an LLVM miscompilation,.
2020-10-14Rollup merge of #77786 - jyn514:rustdoc, r=Mark-SimulacrumYuki Okushi-2/+2
Mention rustdoc in `x.py setup` This lets new contributors know which option they should pick; previously it wasn't clear 'compiler' also included rustdoc. Unresolved questions: should this say 'compiler and tools' instead? I don't know of any tools that are modified in-tree other than rustdoc, though. r? @Mark-Simulacrum
2020-10-14Rollup merge of #77776 - jyn514:wrong-way, r=Mark-SimulacrumYuki Okushi-0/+9
Give an error when running `x.py test --stage 0 src/test/ui` The error can be overridden with `COMPILETEST_FORCE_STAGE0=1`. In practice I don't know why anyone would do this. r? @Mark-Simulacrum Closes https://github.com/rust-lang/rust/issues/77711
2020-10-13bootstrap: set correct path for the build-manifest binaryPietro Albini-1/+1
2020-10-13Handle included config in bootstrap.pyAntoine Martin-0/+10
2020-10-13Implement "if-available" option for download-ci-llvmAntoine Martin-4/+22
2020-10-13 Give an error when running `x.py test --stage 0 src/test/ui`Joshua Nelson-0/+9
2020-10-13Auto merge of #77762 - pietroalbini:dist-build-manifest, r=Mark-Simulacrumbors-23/+98
Dist build manifest This PR makes two changes that should remove a significant chunk of the time spent in our release process: cloning the `rust-lang/rust` monorepo, all its submodules, and building `bootstrap` to then invoke `build-manifest`: * `build-manifest` doesn't rely on a clone of the monorepo being present anymore. The only remaining bit of information it fetched from it (the Rust version) is instead bundled in the binary. * A new "component" is added, `build-manifest`. That component includes a prebuilt version of the tool, and it's *not* included in the Rustup manifest. This will allow `promote-release` to directly invoke the tool without interacting with our build system. * The Linux x86_64 CI is changed to also build the component mentioned above. It's the only CI builder tasked to do so, and to cleanly support this a new `--include-default-paths` flag was added to `./x.py`. * The `BUILD_MANIFEST_NUM_THREADS` environment variable is added to configure the number of threads at runtime. This PR is best reviewed commit-by-commit. r? `@Mark-Simulacrum`
2020-10-12Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` componentAaron Hill-0/+3
Fixes #55890 It's useful to have `llc` and `opt` available when debugging an LLVM miscompilation,.
2020-10-13Rollup merge of #77852 - 12101111:fix-bootstrap-doc, r=jonas-schievinkYuki Okushi-3/+3
update url in bootstrap README (gcc-rs -> cc-rs) gcc-rs is renamed to cc-rs 3 years ago.
2020-10-13Rollup merge of #77746 - winnayx:issue-77572-fix, r=jyn514Yuki Okushi-7/+10
Fix `x.py setup` sets `changelog-seen` Fixes #77572 by setting changelog-seen in setup.rs
2020-10-12build-manifest: bundle the rustc version in the binaryPietro Albini-2/+0
2020-10-12bootstrap: add --include-default-paths to ./x.pyPietro Albini-21/+30
2020-10-12bootstrap: add disabled by default build-manifest dist componentPietro Albini-0/+68
2020-10-12build-manifest: accept the Rust version instead of the monorepo pathPietro Albini-2/+2
This commit changes the way build-manifest is invoked, to let it accept the Rust version directly instead of requiring the path of the Rust monorepo and letting build-manifest figure out the path on its own. This allows to run build-manifest without a clone of the monorepo.
2020-10-12update url in bootstrap README12101111-3/+3
2020-10-11Mostly print statements to see where things areWinnie Xiao-7/+10
More print statementsstatements lol Solved the basic case of eliminating check_version ifk_version if subcommand = setup Finished v1 checking out old bootstrap.py checked out old irrelevant files fixed tidy Moved VERSION from bin/main.rs to lib.rs Fixed semicolon return issue x.py fmt
2020-10-11bootstrap: only use compiler-builtins-c if they existGeorge Burgess IV-5/+5
The assignment of `features` above was added in rust-lang#60981, but never used. Presumably the intent was to replace the string literal here with it. While I'm in the area, `compiler_builtins_c_feature` doesn't need to be a `String`.
2020-10-10Mention rustdoc in `x.py setup`Joshua Nelson-2/+2
This also allows 'rustdoc' as a string for the compiler profile.
2020-10-10Allow setting up git hooks from other worktreesJoshua Nelson-3/+11
2020-10-09bootstrap: always use the Rust version in package namesPietro Albini-52/+1
The format of the tarballs produced by CI is roughly the following: {component}-{release}-{target}.{ext} While on the beta and nightly channels `{release}` is just the channel name, on the stable channel is either the Rust version or the version of the component we're shipping: cargo-0.47.0-x86_64-unknown-linux-gnu.tar.xz clippy-0.0.212-x86_64-unknown-linux-gnu.tar.xz llvm-tools-1.46.0-x86_64-unknown-linux-gnu.tar.xz miri-0.1.0-x86_64-unknown-linux-gnu.tar.xz rls-1.41.0-x86_64-unknown-linux-gnu.tar.xz rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz ... This makes it really hard to get the package URL without having access to the manifest (and there is no manifest on ci-artifacts.rlo), as there is no consistent version number to use. This commit addresses the problem by always using the Rust version number as `{release}` for the stable channel, regardless of the version number of the component we're shipping. I chose that instead of "stable" to avoid breaking the URL scheme *that* much. Rustup should not be affected by this change, as it fetches the URLs from the manifest. Unfortunately we don't have a way to test other clients before making a stable release, as this change only affects the stable channel.
2020-10-08Auto merge of #77631 - jyn514:helpful-changelog, r=RalfJungbors-3/+3
Make src/bootstrap/CHANGELOG.md more helpful Addresses https://github.com/rust-lang/rust/commit/fe6fc555acd51bd7ba8755d9fbc7060feb67be25#r42949241. r? `@RalfJung` cc `@Mark-Simulacrum`
2020-10-06Make src/bootstrap/CHANGELOG.md more helpfulJoshua Nelson-3/+3