This dramatically reduces the memory required to build Rust, and also
speeds up the build.
* gnu/packages/rust.scm (mrustc)[source]: Add snippet to remove building
debug info with mrustc.
* gnu/packages/rust.scm (rust-1.58, rust-1.59, rust-1.60, rust):
Add rust-1.58, rust-1.59, and rust-1.60, and update rust to
be based on rust-1.60 instead of rust-1.57.
Signed-off-by: Marius Bakke <marius@gnu.org>
* gnu/packages/rust.scm (rust-1.57, rust): decouple the definition of
rust-1.57, which happens to be the current latest, from the definition
of rust, which is always the latest. The latter re-enables tests and
extra components, which should always be done only on the final public
rust package, not specifically rust-1.57.
Signed-off-by: Marius Bakke <marius@gnu.org>
And enable rust for aarch64-linux!
* gnu/packages/rust.scm (%mrustc-commit): Update hash.
(%mrustc-source): Update to 0.10.
(rust-1.39)[arguments]: Move and adapt the substitute* that prevent
fetching sources. Patch /bin/sh in run_rustc/rustc_proxy.sh.
[supported-systems]: Add aarch64-linux.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
The older Rusts are made private variables; they shouldn't be used by users as
they are not tested and are only built at stage 1, which makes them unsuitable
to compile Rust applications.
* gnu/packages/crates-io.scm (rust-cargo-0.53)[arguments]: Remove #:rust
argument.
(rust-cxx-1, rust-cxx-build-1, rust-cxx-gen-0.7): Likewise.
* gnu/packages/crates-io.scm
(rust-cxx-gen-0.7, rust-cxxbridge-macro-1, rust-postgres-0.19): Likewise.
(rust-rust-decimal-1, rust-sized-chunks-0.6, rust-socket2-0.4): Likewise.
(rust-tokio-postgres-0.7, rust-im-rc-15): Likewise.
* gnu/packages/gnome.scm (librsvg): Likewise.
* gnu/packages/gnuzilla.scm (mozjs-78): Likewise.
* gnu/packages/rust-apps.scm
(hyperfine, tectonic rust-analyzer, rust-cargo-c): Likewise.
* gnu/packages/shells.scm (nushell): Likewise.
* gnu/packages/syndication.scm (newsboat): Likewise.
* gnu/packages/rust.scm: (rust-1.39, rust-1.40, rust-1.41, rust-1.42)
(rust-1.43, rust-1.44, rust-1.45, rust-1.46, rust-1.47, rust-1.48, rust-1.49)
(rust-1.50, rust-1.51, rust-1.52, rust-1.53, rust-1.54): Make variables private.
* gnu/packages/rust.scm (rust-1.44): Do not replace LLVM version, for
simplicity. It used to be required at this point because LLVM 7 was no longer
supported for rust-1.44, but we're now using LLVM 9.
(rust-1.46): Move all additional phases, doc output to rust-1.54.
(rust-1.53, rust-1.54): New variables.
(rust-1.54): Adjust snippet field.
(rust): Set default Rust to the latest version, 1.54.0.
[native-inputs]: Use the latest GDB.
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.
* .mailmap: Change name for Matthew James Kraai.
* gnu/packages/lisp-xyz.scm, gnu/packages/python-xyz.scm,
gnu/packages/rust.scm: Likewise.
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
* gnu/packages/rust.scm (rust-1.30)[supported-systems]: Instead of hard-coding
this to just "x86_64-linux", calculate the supported systems by deleting
"i686-linux" from %supported-systems.
Because this package is a transitive input to many rust packages, Cuirass is
spending lots of time failing to build it on ci.guix.gnu.org. This change will
hopefully help with that issue.
* gnu/packages/rust.scm (rust-1.26)[supported-systems]: Remove aarch64-linux.
Currently rust fails to build for i686-linux, so this will avoid computing
lots of derivations that depend on rust, but won't be possible to build.
* gnu/packages/rust.scm (rust-1.19)[supported-systems]: Switch hardcoding only
supporting x86_64-linux for supporting all supported systems, other than
i686-linux.
By only testing the final Rust in the bootstrap chain, the total build time is
reduced by approximately 30%, from about 11 hours to 8 hours on a fast
machine. Combined with commit df93fc21a4, the total Rust bootstrap chain
build time should have been halved.
* gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch:
Delete file.
* gnu/local.mk (dist_patch_DATA): De-register it.
* gnu/packages/rust.scm (rust-1.29): Do not apply the above patch.
(rust-1.30): Remove the "doc" output. Disable tests.
[phases]{set-env}: Do not set CFG_DISABLE_CROSS_TESTS.
{relax-gdb-auto-load-safe-path, patch-tests, patch-cargo-index-update}
{patch-aarch64-test, remove-unsupported-tests, disable-amd64-avx-test}
{patch-cargo-tests, patch-cargo-env-shebang}
{ignore-cargo-package-tests}: Remove phases.
{configure}: Remove the doc and gdb bindings and their respective
configuration entries in the generated config.toml file.
{check}: Remove phase.
[native-inputs]{bison, flex, gdb, procps}: Remove inputs.
{python-2}: Replace by python-wrapper.
{rust-1.29}: Do not export variable.
{rust-1.30}: Likewise.
(rust-1.31): Likewise.
[arguments]: Remove field.
(rust-1.32): Do not export variable.
[source]: Remove patch.
[phases]{override-jemalloc}: Order following 'configure.
{remove-flaky-test, patch-aarch64-test}: Remove deletions.
(rust-1.33): Do not export variable.
[arguments]: Remove field.
(rust-1.34): Do not export variable.
(rust-1.35): Likewise.
(rust-1.36): Likewise.
[arguments]: Remove field.
(rust-1.37): Do not export variable.
(rust-1.38): Do not export variable.
[arguments]: Likewise.
(rust-1.39): Do not export variable.
(rust-1.40): Do not export variable.
[phases]: Do not alter the #:phases argument.
(rust-1.41, rust-1.42, rust-1.43): Do not export variables.
(rust-1.44): Likewise.
[arguments]: Remove field.
(rust-1.45): Do not export variable.
[phases]{skip-shebang-tests, skip-networking-test}: Remove phases.
(rust-1.46): Do not export variable.
(rust-1.47): Do not export variable.
[arguments]: Remove field.
(rust-1.48): Do not export variable.
[arguments]: Remove field.
(rust-1.49): Rename to...
(rust): ... this.
[outputs]: Add a "doc" output.
[phases]{enable-docs, add-gdb-to-config}
{relax-gdb-auto-load-safe-path, patch-cargo-env-shebang}
{disable-tests-requiring-git, disable-interrupt-tests}
{patch-command-exec-tests, patch-command-uid-gid-test}
{skip-shebang-tests, patch-process-tests}: New phases.
[native-inputs]{gdb-9.2, procps}: New inputs.
This reduced bootstrap reduces the complete Rust bootstrap chain build time by
approximately 30% compared to the original (about 11 hours instead of 16
hours, on a fast machine).
* gnu/packages/patches/rust-1.45-linker-locale.patch: Delete file.
* gnu/packages/patches/rust-1.48-linker-locale.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): De-register deleted files.
* gnu/packages/rust.scm (%mrustc-source): New variable.
(rust-1.29): New variable. It is bootstrapped from mrust 0.9, which is used
in source form.
(rust-1.30): New variable.
(rust-1.31)[phases]{patch-command-exec-tests-phase}: Rewrite so that it
doesn't need to be redefined later when the file is moved.
{enable-docs}: New phase.
(rust-1.32): Disable tests.
[inputs]: Remove field.
[phases]{override-jemalloc}: Reorder after the configure phase.
(rust-1.33): Enable tests.
[phases]{disable-codegen-tests}: New phase.
(rust-1.34)[phases]{disable-codegen-tests}: Delete phase.
(rust-1.35)[arguments]: Remove field. The disable-tidy-bins-check phase is
now defined in rust-1.30.
(rust-1.38)[phases]{patch-command-exec-tests-phase}: Remove.
{patch-command-uid-gid-test}: Do not worry about the Tidy lint test, which is disabled.
(rust-1.40)[phases]: Move #:validate-runpath? inside the use of
'substitute-keyword-arguments'.
{neuter-tidy}: Delete.
{patch-command-uid-gid-test}: Make the regexp more precise. Remove the TODO
comment, which has been addressed.
(rust-1.44)[inputs]: Replace python2 by python-wrapper.
[phases]{use-python3}: New phase.
(rust-1.45)[source]: Remove field. The linker locale fix is now made via ...
[phases]{set-linker-locale-to-utf8}: ... this phase.
(rust-1.46)[phases]{build, check}: Allow parallel execution. Add comments.
{delete-install-logs}: Delete phase; it's now done in rust-1.30.
(rust-1.47)[phases]{patch-cargo-checksums}: Do not reorder phase. The
initial ordering of the phase has been fixed with in the rust-1.30 package.
(rust-1.48)[source]: Remove field.
This commit is not atomic and is not functional by itself; this is done so to
make the next set of changes more comprehensible.
* gnu/packages/patches/rust-1.19-mrustc.patch: Delete file.
* gnu/packages/patches/rust-1.30-gdb-llvm.patch: Likewise.
* gnu/packages/patches/rust-bootstrap-stage0-test.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Un-register files.
* gnu/packages/rust.scm (mrustc): Delete variable.
(rust-1.19, rust-1.20, rust-1.21 rust-1.22, rust-1.23, rust-1.24)
(rust-1.25, rust-1.26, rust-1.27, rust-1.28, rust-1.29)
(rust-1.30): Delete variables.
(rust-1.31 through rust-1.49): Fix indentation and do other cosmetic changes.
(rust): Define as rust-1.49.