about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-11-23Bump `fd-lock` in `bootstrap` againMateusz Mikuła-61/+22
Followup to https://github.com/rust-lang/rust/pull/103778 Sorry for the quick succession but this fixes one more building issue for Tier 3 `windows-gnullvm` that I have previously missed, and it would be nice to have it in the release.
2022-11-22Rollup merge of #104622 - nicholasbishop:bishop-uefi-clang, r=Mark-SimulacrumManish Goregaokar-0/+49
Use clang for the UEFI targets This fixes an issue where the C and asm sources built by compiler_builtins were being compiled as ELF objects instead of PE objects. This wasn't noticed before because it doesn't cause compiler_builtins or rustc to fail to build. You only see a failure when a program is built that references one of the symbols in an ELF object. Compiling with clang fixes this because the cc crate converts the UEFI targets into Windows targets that clang understands, causing it to produce PE objects. Also update compiler_builtins to 0.1.84 to pull in some necessary fixes for compiling the UEFI targets with clang. Fixes https://github.com/rust-lang/rust/issues/104326
2022-11-21Rollup merge of #104628 - alex-pinkus:revert-android-ndk-upgrade, r=pietroalbiniMatthias Krüger-18/+6
Revert "Update CI to use Android NDK r25b" This reverts commit bf7f1ca316a249cf99d722d79a0db12fef687142 (pull request #102332). The relevant discussion can be found in #103673, where it was agreed that more time is needed to warn the community of the upcoming breakage. This PR is for the `master` branch, where a conflict was recently introduced due to 6d8160261ff3aee3b6eaacc37ac96cafff530980. The conflict is in `cc_detect.rs`, where the code that corrects the target triple was moved to a new function called `ndk_compiler()`. This puts the old logic in the `ndk_compiler` function, and assumes that it works properly in the other location where that code is being called. I would appreciate review from ``@pietroalbini`` to understand how we can test that the reverted logic is also suitable for the additional use case (seems to be related to setting `cc` and `cxx`). I've confirmed already that with these changes I can compile for `armv7-linux-androideabi`, `aarch64-linux-android`, `i686-linux-android`, and `x86_64-linux-android` using `x.py`. A separate revert for the `beta` branch will be required, since the original change has already made it to beta. The beta revert is available at https://github.com/alex-pinkus/rust/commit/3fa0d94674fbe37090ebe44ac1f06e2233f3121e, but I'm not sure of the process for staging that PR.
2022-11-20Rollup merge of #104487 - klensy:ntapi, r=Mark-SimulacrumMatthias Krüger-6/+6
update ntapi dep to remove future-incompat warning This fixes warning https://github.com/rust-lang-ci/rust/actions/runs/3477235400/jobs/5813202075#step:25:217 `warning: the following packages contain code that will be rejected by a future version of Rust: ntapi v0.3.7` by upgrading `sysinfo` version (https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md#0267) There was some breaking changes in `sysinfo`: * 0.25.0 (System::refresh_cpu behaviour changed: it only computes CPU usage and doesn't retrieve CPU frequency.) not affected? * 0.26.0 (Switch memory unit from kilobytes to bytes) fixed.
2022-11-20dist: Ensure UEFI rlibs are all COFFNicholas Bishop-0/+49
If clang isn't the C compiler used for the UEFI targets, or if the wrong `--target` is passed to clang, we will get ELF objects in some rlibs. This will cause problems at link time when trying to compile a UEFI program that uses any of those objects. Add a check to the dist step for UEFI targets that reads each rlib with the `object` crate and fails with an error if any non-COFF objects are found.
2022-11-20Rollup merge of #104611 - notriddle:notriddle/scrape-examples-button, ↵Matthias Krüger-0/+2
r=GuillaumeGomez rustdoc: use real buttons for scrape examples controls This makes the expand and switch controls keyboard-accessible. Preview: https://notriddle.com/notriddle-rustdoc-demos/scrape-examples-button/test_dingus/fn.test.html
2022-11-20refactor doc copying processozkanonur-48/+16
Signed-off-by: ozkanonur <work@onurozkan.dev>
2022-11-19Set `download-ci-llvm = "if-available"` by default when `channel = "dev"`Joshua Nelson-96/+138
See https://github.com/rust-lang/compiler-team/issues/566. The motivation for changing the default is to avoid downloading and building LLVM when someone runs `x build` before running `x setup`. The motivation for only doing it on `channel = "dev"` is to avoid breaking distros or users installing from source. It works because `dev` is also the default channel. The diff looks larger than it is; most of it is moving the `llvm` branch below the `rust` so `config.channel` is set.
2022-11-19Revert "Update CI to use Android NDK r25b"Alex Pinkus-18/+6
This reverts commit bf7f1ca316a249cf99d722d79a0db12fef687142.
2022-11-19rustdoc: add test case for scraped example expand GUIMichael Howell-0/+2
2022-11-19Rollup merge of #104076 - ozkanonur:fix-ci-rustc-sysroot, r=jyn514Matthias Krüger-9/+20
fix sysroot issue which appears for ci downloaded rustc Currently when compiler is downloaded rather than compiled, sysroot is being `ci-rustc-sysroot` because of https://github.com/rust-lang/rust/blob/7eef946fc0e0eff40e588eab77b09b287accbec3/src/bootstrap/compile.rs#L1125-L1131 this. And rustdoc is overriding the downloaded one at the end of the process. With the condition I add, we simply check if the current compiler stage is target build stage, if so use the proper sysroot instead of `ci-rustc-sysroot`. Resolves #103206
2022-11-19Rollup merge of #103969 - ferrocene:pa-download-rustc-ui-tests, r=jyn514Matthias Krüger-9/+20
Partial support for running UI tests with `download-rustc` Right now trying to run UI tests with `download-rustc` results in a bunch of test failures, requiring someone who wants to only work on tests to also build the full compiler. This PR **partially** addresses the problem by solving a lot of the errors (but not all). * This installs the `rust-src` component on CI toolchains, since the test output depends on whether the standard library source code is installed; We can't just symlink the current source because the `rustc-dev` component already includes the compiler sources, but not the library sources, and mixing things is worse IMO. * This ensures the `$SRC_DIR` normalization done by compiletest correctly handles the source code added above. * This unconditionally sets `remap-prefix` to the prefix used in the downloaded toolchain, to ensure compiletest normalizes it.
2022-11-17fmtPietro Albini-1/+1
2022-11-17set correct default value for cc and cxx on androidPietro Albini-20/+29
2022-11-16update ntapi dep to remove future-incompat warningklensy-6/+6
2022-11-16normalize download-rustc's prefix when running compiletestsPietro Albini-9/+19
2022-11-16normalize source paths from sysroot in compiletestPietro Albini-0/+1
2022-11-15initial prototype of the tool to generate copyright noticesPietro Albini-0/+32
2022-11-15add tool to collect license metadata from REUSEPietro Albini-0/+35
2022-11-15add the build.reuse config option to choose the reuse binaryPietro Albini-0/+10
2022-11-14Auto merge of #104387 - Manishearth:rollup-9e551p5, r=Manishearthbors-1/+7
Rollup of 9 pull requests Successful merges: - #103709 (ci: Upgrade dist-x86_64-netbsd to NetBSD 9.0) - #103744 (Upgrade cc for working is_flag_supported on cross-compiles) - #104105 (llvm: dwo only emitted when object code emitted) - #104158 (Return .efi extension for EFI executable) - #104181 (Add a few known-bug tests) - #104266 (Regression test for coercion of mut-ref to dyn-star) - #104300 (Document `Path::parent` behavior around relative paths) - #104304 (Enable profiler in dist-s390x-linux) - #104362 (Add `delay_span_bug` to `AttrWrapper::take_for_recovery`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-13Make all download functions need only Config, not BuilderJoshua Nelson-637/+663
This also adds a new `mod download` instead of scattering the download code across `config.rs` and `native.rs`.
2022-11-13Rollup merge of #104158 - Ayush1325:executable, r=Mark-SimulacrumManish Goregaokar-1/+7
Return .efi extension for EFI executable Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-13Auto merge of #103894 - mati865:gnullvm-libunwind-changes, r=thomccbors-1/+0
Change the way libunwind is linked for *-windows-gnullvm targets I have no idea why previous way works for `x86_64-fortanix-unknown-sgx` (assuming it actually works...) but not for `gnullvm`. It fails when linking libtest during Rust build (unless somebody adds `RUSTFLAGS='-Clinkarg=-lunwind'`). Also fixes exception handling on AArch64.
2022-11-13copy doc output files by format r=ozkanonurozkanonur-13/+46
Signed-off-by: ozkanonur <work@onurozkan.dev>
2022-11-13check if current stage is target build stage r=ozkanonurozkanonur-9/+20
Signed-off-by: ozkanonur <work@onurozkan.dev>
2022-11-12Print "Checking/Building ..." message even when --dry-run is passedJoshua Nelson-3/+5
This makes it a lot easier to understand what commands will be run without having to parse the `-vv` output, which isn't meant to be user facing.
2022-11-12Distinguish `--dry-run` from the automatic dry run checkJoshua Nelson-78/+96
2022-11-11Rollup merge of #104245 - kubycsolutions:master, r=jyn514Dylan DPC-1/+1
Reduce default configuration's dependency upon static libstdcpp library (#103606) Fixes #103606 Remove default dependency on static libstdcpp except during dist llvm builds (where we want static libraries so `libLLVM.so` is self-contained).
2022-11-10Avoid runtime dependency on static libstdc++kubycsolutions-1/+1
Usually, we do want to use the static C++ library when building rustc_llvm, but do not want to have that dependency at compiler runtime. Change the defaults to Make It So.
2022-11-09Rollup merge of #104046 - RalfJung:run-miri-run, r=oli-obkMichael Goulet-54/+140
bootstrap: add support for running Miri on a file This enables: ``` ./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs ``` That can be super helpful for debugging. Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri. Fixes https://github.com/rust-lang/rust/issues/76666
2022-11-08Rollup merge of #103778 - mati865:update-deps, r=Mark-SimulacrumManish Goregaokar-10/+67
Update several crates for improved support of the new targets This helps with `*-windows-gnullvm` targets by reducing amount of patching.
2022-11-08Rollup merge of #104027 - ted-tanner:issue-103697-fix, r=jyn514Guillaume Gomez-4/+5
Place config.toml in current working directory if config not found Fixes an issue where bootsrapping a Rust build would place `config.toml` in `{src_root}` rather than the current working directory #103697
2022-11-08Return .efi extension for EFI executableAyush Singh-1/+7
Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-07Only set config.config to None when using default pathTanner Davies-1/+2
2022-11-07Auto merge of #103569 - RalfJung:miri-test-macos, r=Mark-Simulacrumbors-0/+16
fix and (re-)enable Miri cross-target checks on macOS and Windows Fixes https://github.com/rust-lang/rust/issues/103519 r? `@Mark-Simulacrum`
2022-11-07add FIXME to replace this env var in the futureRalf Jung-0/+6
2022-11-06bootstrap: put Miri sysroot into local build dirRalf Jung-1/+9
2022-11-06bootstrap: add support for running Miri on a fileRalf Jung-54/+132
2022-11-06Rollup merge of #103851 - viandoxdev:103816_bootstrap_fix_json_doc, r=jyn514Matthias Krüger-53/+44
Fix json flag in bootstrap doc Fix the `--json` flag not working with x.py (Closes #103816) While this works I'm not sure about the `should_run` of `JsonStd`, had to change it because https://github.com/rust-lang/rust/blob/ab5a2bc7316012ee9b2a4a4f3821673f2677f3d5/src/bootstrap/builder.rs#L334 would match with JsonStd and remove the paths that Std matched. So I did [this](https://github.com/viandoxdev/rust/blob/ffd4078264c4892b5098d6191e0adfe3564d62ca/src/bootstrap/doc.rs#L526-L534) but that looks more like a hack/workaround than anything. I'm guessing there's something to do with the default condition thing but idk how it works
2022-11-05Place config.toml in current working directory if config not foundTanner Davies-4/+4
2022-11-05fix out dir being wrong in jsonviandoxdev-1/+5
2022-11-05Rollup merge of #103920 - ferrocene:pa-maybe-open-in-browser, r=jyn514Matthias Krüger-25/+28
Move browser opening logic in `Builder` This allows `open()` to be called from other places in bootstrap (I need this for Ferrocene, as we keep our custom steps in `src/bootstrap/ferrocene`), and it simplifies the callers by moving the `was_invoked_explicitly` check into the function.
2022-11-05Update several crates for improved support of the new targetsMateusz Mikuła-10/+67
This helps with `*-windows-gnullvm` targets
2022-11-05Rollup merge of #103878 - Mark-Simulacrum:fix-stable-ci-download, r=jyn514Matthias Krüger-17/+42
Fix artifact version/channel detection for stable On stable, our artifacts are uploaded with the raw version number (e.g., 1.65.0), not the channel. This adjusts our detection logic to use the version number from src/version when we detect the stable channel. This is really only important for stable channel re-builds, I think, but those do happen from time to time. I'm backporting a similar commit in https://github.com/rust-lang/rust/pull/103859 to make that PR pass CI.
2022-11-03address review commentPietro Albini-2/+5
2022-11-03Fix artifact version/channel detection for stableMark Rousskov-17/+42
On stable, our artifacts are uploaded with the raw version number (e.g., 1.65.0), not the channel. This adjusts our detection logic to use the version number from src/version when we detect the stable channel.
2022-11-03move browser opening logic in BuilderPietro Albini-29/+29
This allows open() to be called from other places in bootstrap (I need this for Ferrocene), and it simplifies the callers by moving the "was_invoked_explicitly" check into the function.
2022-11-02Ban dashes in miropt test file namesJakob Degen-0/+3
2022-11-02prevent open with jsonviandoxdev-0/+5