diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-08-21 01:01:23 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-11-11 12:18:10 -0500 |
commit | 33133a6ed32752b2ad2b974f7d63d9302c476a7f (patch) | |
tree | 7608d504ebfeb52ced615fa488dcdeba463f34b4 /gnu/local.mk | |
parent | 6d7a0b84e202ee29336cc758bf0cb90d5ffcdfb6 (diff) | |
download | guix-33133a6ed32752b2ad2b974f7d63d9302c476a7f.tar.gz |
gnu: rust: Bootstrap rust from 1.39.0 and optimize build time.
Only stage 1 (rather than stage 2) rustc and cargo are built and the installation phase rewritten to not invoke the build tool, which helps to shorten the build time to about 10 minutes per Rust on a fast machine. The total build time should take less than 4h30, down from the current 8 hours on a Ryzen 3900X CPU. * gnu/packages/patches/rust-reproducible-builds.patch: Delete file. * gnu/packages/patches/rustc-1.39.0-src.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it, and un-register rust-reproducible-builds.patch. * gnu/packages/rust.scm (%mrustc-commit): New variable. (%mrustc-source): Update to latest commit. (rust-1.29): Morph into... (rust-1.39): ... this. [source]: Adjust the snippet, patches and patch-flags fields. [inputs]: Replace llvm-7 by llvm (9). [make-flags]: Add the RUSTC_VERSION, MRUSTC_TARGET_VER and OUTDIR_SUF make variables. Remove the RUSTCSRC make variable. [phases]{copy-mrustc-and-patch}: Rename to... {setup-mrustc-sources}: ... this. A symbolic link is created inside the mrustc directory, pointing to the Rust 1.39.0 sources. {patch-makefiles}: Adjust directory. Patch date and git definitions. Edit out the RUSTC_SRC_DL prerequisite. Adjust the patching of a shebang. {patch-cargo-checksums}: Adjust. {configure-cargo-home}: New phase. {configure}: Create and add a 'cc' shim to PATH. {build}: Do not invoke make in parallel mode inside the run_rustc directory. (rust-1.30): Morph into... (rust-1.40): ... this, integrating the changes introduced between 1.30 and 1.40. [modules]: Properly import (guix build cargo-utils). [phases]{add-cc-shim-to-path}: New phase. {configure}: Increase the codegen-units value to 256. {build}: Only build stage 1 rustc and cargo, and group the commands into one invocation. {install}: Manually install the stage 1 build artifacts. {patch-cargo-checksums}: Remove the ad-hoc use-modules, no longer needed. [source]: Adjust. [arguments]: Set validate-runpath? to #f. [phases]{patch-cargo-checksums}: Remove phase. {configure}: Repatriate the jemalloc configuration changes from 1.40. [native-inputs]: Replace the rust-1.29 inputs by rust-1.39. Use regular jemalloc and llvm versions. (rust-1.41)[phases]: Add the patch-cargo-checksums phase. (rust-1.31, rust-1.32, rust-1.33, rust-1.34, rust-1.35, rust-1.36, rust-1.37) (rust-1.38, rust-1.39, rust-1.40): Delete variables. (rust-1.46)[phases]{install}: Group build, test and install commands. (rust-1.47)[phases]{build}: Override to adjust for the relocation of the standard library source directory.
Diffstat (limited to 'gnu/local.mk')
-rw-r--r-- | gnu/local.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index cbb083e6ae..cd92b825a3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1747,12 +1747,12 @@ dist_patch_DATA = \ %D%/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch \ %D%/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch \ %D%/packages/patches/ruby-sanitize-system-libxml.patch \ + %D%/packages/patches/rustc-1.39.0-src.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \ %D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \ %D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ - %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/sbc-fix-build-non-x86.patch \ %D%/packages/patches/sbcl-burgled-batteries3-fix-signals.patch \ |