summary refs log tree commit diff
path: root/src/bootstrap/compile.rs
AgeCommit message (Collapse)AuthorLines
2023-04-14Auto merge of #110263 - jyn514:ui-fulldeps-llvm, r=albertlarsan68bors-4/+5
Add `libLLVM.so` to the target libdir when download-rustc is enabled Previously, we would only add it to the host libdir, which meant it couldn't be loaded by `ui-fulldeps` tests that used rustc_private. Fixes https://github.com/rust-lang/rust/issues/110225, fixes https://github.com/rust-lang/rust/issues/110226.
2023-04-12Add `libLLVM.so` to the target libdir when download-rustc is enabledjyn-4/+5
Previously, we would only add it to the host libdir, which meant it couldn't be loaded by `ui-fulldeps` tests that used rustc_private.
2023-04-12Rollup merge of #110122 - jyn514:check-stage1-llvm, r=ozkanonurMatthias Krüger-70/+78
Fix x check --stage 1 when download-ci-llvm=false Bootstrap tries to avoid building LLVM unless it needs to; in particular we only build it for `x build`, not `x check`. Unfortunately, the check forgot about existence of stages - it would break if you used `x check --stage 1`: ``` = note: /usr/bin/ld: cannot find -lPolly: No such file or directory /usr/bin/ld: cannot find -lPollyISL: No such file or directory ``` Fix it to work for stage 1. I recommend reading this commit-by-commit; the first one makes a bunch of whitespace changes but otherwise doesn't change the logic.
2023-04-10Fix `x check --stage 1` when `download-ci-llvm=false`Joshua Nelson-18/+20
2023-04-10Fix `x test ui --target foo` when download-rustc is enabledJoshua Nelson-3/+3
Previously, we would never build the target std, only the host std.
2023-04-09Separate out a `rustc_llvm_env` functionJoshua Nelson-61/+67
2023-04-03Auto merge of #109884 - matthiaskrgr:rollup-5wapig9, r=matthiaskrgrbors-1/+43
Rollup of 7 pull requests Successful merges: - #109526 (LIBPATH is used as dylib's path environment variable on AIX) - #109642 (check for missing codegen backeng config) - #109722 (Implement read_buf for RustHermit) - #109856 (fix(middle): emit error rather than delay bug when reaching limit) - #109868 (Improve PR job names in Github Actions preview) - #109871 (Include invocation start times) - #109873 (Move some UI tests into subdirectories) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-03Rollup merge of #109642 - ↵Matthias Krüger-1/+43
lenko-d:rust_codegen-backends_interacts_confusingly_with_paths, r=Mark-Simulacrum check for missing codegen backeng config Fixes [#109610](https://github.com/rust-lang/rust/issues/109610)
2023-04-03Auto merge of #108288 - ozkanonur:hotfix-90244, r=Mark-Simulacrumbors-0/+7
fix `build --stage 2 compiler/rustc` panic Skip assembling(which causes panic due to not found `.librustc.stamp` file) process for stage3(since it has problems with sysroot) if full-bootstrap isn't used. Resolves #90244
2023-04-02fix `build --stage 2 compiler/rustc` panicozkanonur-0/+7
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-03-26check for missing codegen backeng configLenko Donchev-1/+43
2023-03-24Rename 'src/bootstrap/native.rs' to llvm.rsRobin Hafid-9/+9
Renamed 'native.rs' to 'llvm.rs', also moved `TestHelpers` to `test.rs`.Replaced all the `native.rs` ocurrences at `src/bootstrap` files to `llvm.rs`
2023-03-12Prevent stable `libtest` from supporting `-Zunstable-options`Thom Chiovoloni-0/+6
2023-02-27Rollup merge of #108308 - bjorn3:faster_bootstrap_build, r=albertlarsan68Matthias Krüger-1/+1
Allow building serde and serde_derive in parallel This reduces build time of bootstrap by ~6s
2023-02-27Allow building serde and serde_derive in parallelbjorn3-1/+1
This reduces build time of bootstrap by ~6s
2023-02-21Revert "Copy `bin/*` and `lib/*.dylib` files to `stage0-sysroot`"Jakub Beránek-66/+0
This reverts commit 6990ab9ad2cde9b67073ffac29ffecc2be8e722f.
2023-02-19Improve building compiler artifacts outputMatthew J Perez-33/+78
2023-02-18Auto merge of #106476 - ↵bors-1/+6
keith:ks/add-sanitizer-support-for-modern-ios-platforms, r=badboy Add sanitizer support for modern iOS platforms asan and tsan generally support iOS, but that previously wasn't configured in rust. This only adds support for the simulator architectures, and arm64 device architecture, not the older 32 bit architectures.
2023-02-17Copy `bin/*` and `lib/*.dylib` files to `stage0-sysroot`KittyBorgX-0/+66
2023-02-12Add sanitizer support for modern iOS platformsKeith Smiley-1/+6
asan and tsan generally support iOS, but that previously wasn't configured in rust. This only adds support for the simulator architectures, and arm64 device architecture, not the older 32 bit architectures.
2023-01-26Add `rust.lto=off` to bootstrapclubby789-0/+10
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-1/+1
2023-01-04Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`"Joshua Nelson-2/+10
This reverts commit 9dfe50440e6d48bd2fd40a4b7b3992998e55eace. Fixes `x clippy`.
2022-12-31Only include metadata for non-dynamic libraries in rustc-devbjorn3-6/+43
The actual object code should be linked from librustc_driver.so, which is still included in rustc-dev. This saves on download time and disk usage.
2022-12-30bootstrap: Get rid of `tail_args` in `stream_cargo`Joshua Nelson-24/+4
2022-12-30Use more consistent progress messages in bootstrapJoshua Nelson-8/+18
Before: ``` Testing ["rustc_interface"] stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ``` After: ``` Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ``` Note there is a slight consistency between `build` and `test`: The former doesn't print "compiler artifacts". It would be annoying to fix and doesn't hurt anything, so I left it be. ``` ; x t rustc_interface --stage 0 --dry-run Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ; x b rustc_interface --stage 0 --dry-run Building {rustc_interface} stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) ```
2022-12-29Support `x clean --stage 1 rustc_query_impl`Joshua Nelson-4/+11
Previously, clean only supported `--stage 0` for specific crates. The new `crate_description` function generates a string that looks like ``` : {rustc_query_impl} ```
2022-12-28Skip LTO in stage0 (again)Mark Rousskov-16/+20
2022-12-28delete more `cfg(bootstrap)`Lukas Markeffsky-19/+16
2022-12-26Allow cleaning individual cratesJoshua Nelson-13/+2
As a bonus, this stops special casing `clean` in `Builder`.
2022-12-23Rollup merge of #106051 - jyn514:cranelift-std, r=bjorn3Matthias Krüger-3/+10
Allow building std with cranelift - Don't pass llvm-specific args when using cranelift - Don't use `asm` in compiler_builtins when using cranelift r? `@bjorn3` cc `@Mark-Simulacrum`
2022-12-22Allow building std with craneliftJoshua Nelson-3/+10
- Don't pass llvm-specific args when using cranelift - Don't use `asm` in compiler_builtins when using cranelift
2022-12-22Use LLVM_CMAKE_DIR for lld buildNikita Popov-3/+4
LLVM_CONFIG_PATH is no longer supported as of LLVM 16, switch to using the cmake module instead. We separately return the llvm-config and cmake directory paths, because llvm-config always refers to the host binary, while the cmake directory is for the target triple.
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-13Make all download functions need only Config, not BuilderJoshua Nelson-2/+2
This also adds a new `mod download` instead of scattering the download code across `config.rs` and `native.rs`.
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-13check if current stage is target build stage r=ozkanonurozkanonur-9/+20
Signed-off-by: ozkanonur <work@onurozkan.dev>
2022-11-12Distinguish `--dry-run` from the automatic dry run checkJoshua Nelson-6/+6
2022-11-01Change the way libunwind is linked for `*-windows-gnullvm` targetsMateusz Mikuła-1/+0
2022-10-29Revert "Make the `c` feature for `compiler-builtins` opt-in instead of inferred"Mark Rousskov-10/+5
This reverts commit 3acb505ee560770c62bad5362f6caf7567d467b9 (PR #101833). The changes in this commit caused several bugs or at least incompatibilies. For now we're reverting this commit and will re-land it alongside fixes for those bugs.
2022-10-23Rollup merge of #103347 - RalfJung:rustc-src, r=Mark-SimulacrumMichael Howell-0/+14
bootstrap: also create rustc-src component in sysroot Fixes https://github.com/rust-lang/rust-analyzer/issues/12926
2022-10-23Introduce dedicated `-Zdylib-lto` flag for enabling LTO on `dylib`sJakub Beránek-0/+22
2022-10-23Add `rust.lto` config optionJakub Beránek-1/+1
2022-10-21bootstrap: also create rustc-src component in sysrootRalf Jung-0/+14
2022-10-14more dupe word typosRageking8-1/+1
2022-10-07Auto merge of #102025 - chenyukang:fix-102002, r=jyn514bors-2/+10
Delete the stage1 and stage0-sysroot directories when using download-rustc Fixes #102002
2022-10-04use ci-rustc-sysroot for sysroot when download_rustcyukang-1/+3
2022-09-28Make the `c` feature for `compiler-builtins` opt-in instead of inferredJoshua Nelson-5/+10
The build script for `compiler_builtins` doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Rather than trying to fix it or special-case the platforms without bugs, make it opt-in instead of automatic.
2022-09-20fix #102002, Delete the stage1 and stage0-sysroot directories when using ↵yukang-2/+8
download-rustc
2022-09-17Revert "fix #101691: copy stage0 binaries into stage0-sysroot"Mark Rousskov-37/+0
This reverts commit 32f8eb2fee4d6781a79052b560abd10e12ebb34f.