[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: gnu: rust-bootstrap: Disable debug info during build.
From: |
guix-commits |
Subject: |
02/04: gnu: rust-bootstrap: Disable debug info during build. |
Date: |
Thu, 20 Oct 2022 08:45:35 -0400 (EDT) |
efraim pushed a commit to branch staging
in repository guix.
commit 01be1973f464cb81cdece54f7858f0dee46abb50
Author: Mark H Weaver <mhw@netris.org>
AuthorDate: Thu Oct 20 10:06:05 2022 +0300
gnu: rust-bootstrap: Disable debug info during build.
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 | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index d24ecbf2ae..6b40423709 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2021 (unmatched parenthesis <paren@disroot.org>
;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2022 Jim Newsome <jnewsome@torproject.org>
+;;; Copyright © 2022 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -138,7 +139,14 @@
(file-name (git-file-name name (git-version version revision commit)))
(sha256
(base32
- "09rvm3zgx1d86gippl8qzh13m641ynbw9q0zsc90g0h1khd3z3b6")))))
+ "09rvm3zgx1d86gippl8qzh13m641ynbw9q0zsc90g0h1khd3z3b6"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Drastically reduces memory and build time requirements
+ ;; by disabling debug by default.
+ (substitute* (find-files "." "Makefile")
+ (("-g ") "")))))))
;;; Rust 1.54 is special in that it is built with mrustc, which shortens the
;;; bootstrap path.