Commit Graph

71 Commits

Author SHA1 Message Date
bjorn3
bcac222013 Lazily patch the standard library 2023-06-13 16:39:59 +00:00
bjorn3
6b9af8cb36 Disable all incremental compilation for CARGO_BUILD_INCREMENTAL=false 2023-06-13 16:39:59 +00:00
bjorn3
eb3e8bb7d7 Move some profile settings out of the stdlib cargo workspace patch 2023-06-13 16:39:59 +00:00
bjorn3
8ad9e9f861 Ensure everything has a lockfile 2023-06-13 16:39:59 +00:00
bjorn3
3baee66f9b Rework standard library building 2023-06-13 16:39:59 +00:00
bjorn3
54eaa5382c Enable compiler-builtins no-asm feature using --features flag 2023-06-13 16:39:59 +00:00
bjorn3
0e4139922e Put patched sources in build/ instead of download/ 2023-06-13 16:39:59 +00:00
bjorn3
d0b8896189 Allow building the build system using cargo
Rust's build system only handles cargo, not rustc.
2023-06-13 16:39:59 +00:00
bjorn3
5b3bc29008 Allow testing a cranelift backend built into rustc itself
This avoids building cranelift twice in rust's CI and is a lot easier
than trying to make building of codegen backends work from within a
cargo invocation done by rust's build system.
2023-05-24 17:27:28 +00:00
bjorn3
a2f720d9fe Allow building and testing without rustup
This can be done by installing the nightly specified in
rust-toolchain.toml and then pointing the CARGO, RUSTC and RUSTDOC env
vars to the right executables.
2023-05-22 17:17:05 +00:00
bjorn3
de8a4d5d46 Remove all implicit "rustc" from rustc_info.rs 2023-05-22 17:10:55 +00:00
bjorn3
b773282309 Use --sysroot ... instead of --sysroot=...
Rust's build system doesn't handle --sysroot=... correctly
2023-05-14 13:00:00 +00:00
bjorn3
aea3bd6641 Re-enable DataflowConstProp for standard library builds 2023-02-26 13:01:47 +00:00
bjorn3
98ddd69aae Add wrappers to dist/bin/ too in addition to dist/
Rust's build system since recently expects rustc to be in a bin/
directory if it is specified using the rustc option in config.toml.
2023-02-19 15:28:01 +00:00
bjorn3
8ed6baa749 Rustup to rustc 1.69.0-nightly (2d14db321 2023-02-15) 2023-02-17 18:42:33 +01:00
bjorn3
9491031f9a Rustup to rustc 1.69.0-nightly (0416b1a6f 2023-02-14) 2023-02-17 18:42:14 +01:00
bjorn3
efb92a1ae8 Use packed debuginfo for the sysroot on macOS
This reduces the sysroot size
2023-02-03 20:02:15 +00:00
bjorn3
4e87f13054 Fix a couple of TOCTOU occurences 2023-01-19 15:58:40 +00:00
bjorn3
0f4df8fb0e Eliminate a couple of extra calls
This is an additional 17% improvement on ./y.rs compile --sysroot none

Benchmark 1: ./y_before.bin build --sysroot none
  Time (mean ± σ):      1.533 s ±  0.022 s    [User: 1.411 s, System: 0.471 s]
  Range (min … max):    1.517 s …  1.589 s    10 runs

Benchmark 2: ./y_after.bin build --sysroot none
  Time (mean ± σ):      1.311 s ±  0.020 s    [User: 1.232 s, System: 0.428 s]
  Range (min … max):    1.298 s …  1.366 s    10 runs

Summary
  './y_after.bin build --sysroot none' ran
    1.17 ± 0.02 times faster than './y_before.bin build --sysroot none'
2023-01-15 15:20:36 +00:00
bjorn3
abcff71bec Significantly speed up assembling of sysroots
By avoiding some redundant rustc calls and stripping debuginfo for
wrappers. ./y.rs build --sysroot none now runs 44% faster.

Benchmark 1: ./y_before.bin build --sysroot none
  Time (mean ± σ):      2.200 s ±  0.038 s    [User: 2.140 s, System: 0.653 s]
  Range (min … max):    2.171 s …  2.303 s    10 runs

Benchmark 2: ./y_after.bin build --sysroot none
  Time (mean ± σ):      1.528 s ±  0.020 s    [User: 1.388 s, System: 0.490 s]
  Range (min … max):    1.508 s …  1.580 s    10 runs

Summary
  './y_after.bin build --sysroot none' ran
    1.44 ± 0.03 times faster than './y_before.bin build --sysroot none'
2023-01-15 14:14:13 +00:00
bjorn3
13197322ec Skip creating sysroot target dir if it will be empty 2023-01-14 18:45:47 +00:00
bjorn3
280dffd82c Build rtstartup for none sysroot too
Even mini_core needs it
2023-01-14 18:41:22 +00:00
bjorn3
fd83b27945 Port llvm sysroot building to SysrootTarget too and dedup some code 2023-01-14 18:25:43 +00:00
bjorn3
0ac4456351 Move rtstartup build to build_clif_sysroot_for_triple
Also pass build/rtstartup as sysroot when building the standard library
2023-01-14 17:51:54 +00:00
bjorn3
6f1e1775d3 Introduce SysrootTarget 2023-01-14 17:40:16 +00:00
bjorn3
c950f2265e Build rtstartup for MinGW from scratch
Rather than copying it from an existing sysroot
2023-01-14 17:02:21 +00:00
bjorn3
629eab79c1 Avoid hard-coded rustc when building wrappers 2023-01-14 14:18:11 +00:00
bjorn3
22c5249f68 Don't hard-code rustc path in get_rustc_version and get_default_sysroot 2023-01-14 14:18:11 +00:00
bjorn3
4dbafefe74 Return Compiler from build_sysroot 2023-01-14 14:18:11 +00:00
bjorn3
bbb7a3b9b9 Rename Compiler variables for clarity 2023-01-14 14:18:11 +00:00
bjorn3
a3468770e3 Rustfmt 2023-01-13 16:13:26 +00:00
bjorn3
957d78c479 Fetch all cargo dependencies in ./y.rs prepare 2023-01-13 15:40:22 +00:00
bjorn3
f311ef5a2e Share cross-compilation code between building and testing 2023-01-13 12:32:20 +00:00
bjorn3
70a1cb9e62 Pass around Compiler instead of target triples 2023-01-13 12:16:11 +00:00
bjorn3
4c97569a54 Move patched sysroot from build_sysroot/ to download/ 2023-01-05 18:14:40 +00:00
Afonso Bordado
e12a882a67
S390X CI Support (#1304) 2022-12-04 00:23:01 +01:00
bjorn3
82b2d8e418 Introduce Dirs type to avoid hard coding src and dest locations 2022-12-01 19:00:32 +00:00
bjorn3
4529979330 Introduce RelPath 2022-12-01 19:00:32 +00:00
bjorn3
e75dfef4d4 Put all temporary build artifacts in build/ 2022-12-01 19:00:32 +00:00
bjorn3
9c21990283 Rename target_dir to dist_dir in a couple of places 2022-11-28 15:02:08 +00:00
bjorn3
cdae9bab58 Introduce CargoProject type and use it where possible 2022-11-27 18:53:00 +00:00
bjorn3
f17dbfc933 Add rustdoc-clif wrapper 2022-10-28 12:51:15 +00:00
bjorn3
d422d50651 Pass --sysroot when building the new sysroot
To avoid accidentally loading the original libcore
2022-09-25 15:14:59 +02:00
bjorn3
be305c2b1f Introduce cargo_command helper 2022-09-12 10:35:38 +00:00
bjorn3
b12286fec3 Let abi-checker take the full path to the cg_clif dylib 2022-09-12 10:35:38 +00:00
bjorn3
0db9094231 Rustfmt 2022-07-31 10:15:56 +00:00
Afonso Bordado
f588bfa095 Assume host target in get_file_name 2022-07-30 23:04:59 +01:00
Afonso Bordado
393613439a Fix some cross compilation scenarios in test runner 2022-07-30 20:28:55 +01:00
Afonso Bordado
ae4fe1d57d Use get_file_name in tests 2022-07-30 14:07:02 +01:00
Afonso Bordado
437b441ff5 Use get_file_name everywhere for better cross compilation support 2022-07-30 13:06:37 +01:00