From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 50358@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#50358] [PATCH core-updates-frozen 5/8] gnu: rust: Add rust 1.54 and move all non-bootstrapping logic to it.
Date: Fri, 3 Sep 2021 11:31:13 -0400 [thread overview]
Message-ID: <20210903153116.22517-5-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20210903153116.22517-1-maxim.cournoyer@gmail.com>
* 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.
---
gnu/packages/rust.scm | 167 +++++++++++++++++++++---------------------
1 file changed, 83 insertions(+), 84 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 1a819abf32..36c9b4d012 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -540,15 +540,11 @@ safety and thread safety guarantees.")
(rust-bootstrapped-package
rust-1.42 "1.43.0" "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm"))
-;; This version needs llvm >= 8.0 and NOT 11
+;; This version requires llvm <= 11.
(define-public rust-1.44
- (let ((base-rust (rust-bootstrapped-package
- rust-1.43 "1.44.1"
- "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky")))
- (package
- (inherit base-rust)
- (inputs
- (alist-replace "llvm" (list llvm-10) (package-inputs base-rust))))))
+ (rust-bootstrapped-package
+ rust-1.43 "1.44.1"
+ "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))
(define-public rust-1.45
(let ((base-rust (rust-bootstrapped-package
@@ -567,53 +563,8 @@ safety and thread safety guarantees.")
"linker.env(\"LC_ALL\", \"en_US.UTF-8\");")))))))))))
(define-public rust-1.46
- (let ((base-rust (rust-bootstrapped-package
- rust-1.45 "1.46.0"
- "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid")))
- (package
- (inherit base-rust)
- (outputs (cons "rustfmt" (package-outputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'build
- ;; Phase overridden to also build rustfmt.
- (lambda* (#:key parallel-build? #:allow-other-keys)
- (let ((job-spec (string-append
- "-j" (if parallel-build?
- (number->string (parallel-job-count))
- "1"))))
- (invoke "./x.py" job-spec "build"
- "library/std" ;rustc
- "src/tools/cargo"
- "src/tools/rustfmt"))))
- (replace 'check
- ;; Phase overridden to also test rustfmt.
- (lambda* (#:key tests? parallel-build? #:allow-other-keys)
- (when tests?
- (let ((job-spec (string-append
- "-j" (if parallel-build?
- (number->string (parallel-job-count))
- "1"))))
- (invoke "./x.py" job-spec "test" "-vv"
- "library/std"
- "src/tools/cargo"
- "src/tools/rustfmt")))))
- (replace 'install
- ;; Phase overridden to also install rustfmt.
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "./x.py" "install")
- (substitute* "config.toml"
- ;; Adjust the prefix to the 'cargo' output.
- (("prefix = \"[^\"]*\"")
- (format #f "prefix = ~s" (assoc-ref outputs "cargo"))))
- (invoke "./x.py" "install" "cargo")
- (substitute* "config.toml"
- ;; Adjust the prefix to the 'rustfmt' output.
- (("prefix = \"[^\"]*\"")
- (format #f "prefix = ~s" (assoc-ref outputs "rustfmt"))))
- (invoke "./x.py" "install" "rustfmt"))))))))))
+ (rust-bootstrapped-package
+ rust-1.45 "1.46.0" "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid"))
(define-public rust-1.47
(let ((base-rust (rust-bootstrapped-package
@@ -640,12 +591,44 @@ safety and thread safety guarantees.")
rust-1.47 "1.48.0" "0fz4gbb5hp5qalrl9lcl8yw4kk7ai7wx511jb28nypbxninkwxhf"))
(define-public rust-1.49
+ (rust-bootstrapped-package
+ rust-1.48 "1.49.0" "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2mm"))
+
+(define-public rust-1.50
+ (rust-bootstrapped-package
+ rust-1.49 "1.50.0" "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm"))
+
+(define-public rust-1.51
+ (rust-bootstrapped-package
+ rust-1.50 "1.51.0" "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prnsvs"))
+
+;;; The LLVM requiriment has been bumped to version 10 in Rust 1.52. Use the
+;;; latest available.
+(define-public rust-1.52
(let ((base-rust (rust-bootstrapped-package
- rust-1.48 "1.49.0"
- "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2mm")))
+ rust-1.51 "1.52.1"
+ "165zs3xzp9dravybwslqs1qhn35agp6wacmzpymqg3qfdni26vrs")))
+ (package
+ (inherit base-rust)
+ (inputs (alist-replace "llvm" (list llvm-12)
+ (package-inputs base-rust))))))
+
+(define-public rust-1.53
+ (rust-bootstrapped-package
+ rust-1.52 "1.53.0" "1f95p259dfp5ca118bg107rj3rqwlswy65dxn3hg8sqgl4wwmxsw"))
+
+(define-public rust-1.54
+ (let ((base-rust
+ (rust-bootstrapped-package
+ rust-1.53 "1.54.0"
+ "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc")))
(package
(inherit base-rust)
- (outputs (cons "doc" (package-outputs base-rust)))
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (snippet '(delete-file-recursively "src/llvm-project"))))
+ (outputs (cons "rustfmt" (package-outputs base-rust)))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:tests? _ #f)
@@ -743,35 +726,51 @@ safety and thread safety guarantees.")
(substitute* "config.toml"
(("^python =.*" all)
(string-append all
- "gdb = \"" gdb "/bin/gdb\"\n"))))))))))
+ "gdb = \"" gdb "/bin/gdb\"\n"))))))
+ (replace 'build
+ ;; Phase overridden to also build rustfmt.
+ (lambda* (#:key parallel-build? #:allow-other-keys)
+ (let ((job-spec (string-append
+ "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))
+ (invoke "./x.py" job-spec "build"
+ "library/std" ;rustc
+ "src/tools/cargo"
+ "src/tools/rustfmt"))))
+ (replace 'check
+ ;; Phase overridden to also test rustfmt.
+ (lambda* (#:key tests? parallel-build? #:allow-other-keys)
+ (when tests?
+ (let ((job-spec (string-append
+ "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))
+ (invoke "./x.py" job-spec "test" "-vv"
+ "library/std"
+ "src/tools/cargo"
+ "src/tools/rustfmt")))))
+ (replace 'install
+ ;; Phase overridden to also install rustfmt.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "./x.py" "install")
+ (substitute* "config.toml"
+ ;; Adjust the prefix to the 'cargo' output.
+ (("prefix = \"[^\"]*\"")
+ (format #f "prefix = ~s" (assoc-ref outputs "cargo"))))
+ (invoke "./x.py" "install" "cargo")
+ (substitute* "config.toml"
+ ;; Adjust the prefix to the 'rustfmt' output.
+ (("prefix = \"[^\"]*\"")
+ (format #f "prefix = ~s" (assoc-ref outputs "rustfmt"))))
+ (invoke "./x.py" "install" "rustfmt")))))))
;; Add test inputs.
- (native-inputs (cons*
- ;; The tests fail when using GDB 10 (see:
- ;; https://github.com/rust-lang/rust/issues/79009).
- `("gdb" ,gdb-9.2)
- `("procps" ,procps)
- (package-native-inputs base-rust))))))
-
-(define-public rust-1.50
- (rust-bootstrapped-package rust-1.49 "1.50.0"
- "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm"))
-
-(define-public rust-1.51
- (rust-bootstrapped-package rust-1.50 "1.51.0"
- "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prnsvs"))
-
-(define-public rust-1.52
- (let ((base-rust
- (rust-bootstrapped-package rust-1.51 "1.52.1"
- "165zs3xzp9dravybwslqs1qhn35agp6wacmzpymqg3qfdni26vrs")))
- (package
- (inherit base-rust)
- (inputs
- (alist-replace "llvm" (list llvm-12)
- (package-inputs base-rust))))))
+ (native-inputs (cons* `("gdb" ,gdb)
+ `("procps" ,procps)
+ (package-native-inputs base-rust))))))
;;; Note: Only the latest versions of Rust are supported and tested. The
;;; intermediate rusts are built for bootstrapping purposes and should not
;;; be relied upon. This is to ease maintenance and reduce the time
;;; required to build the full Rust bootstrap chain.
-(define-public rust rust-1.49)
+(define-public rust rust-1.54)
--
2.33.0
next prev parent reply other threads:[~2021-09-03 15:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 15:29 [bug#50358] [PATCH core-updates-frozen 0/8] Shortened Rust bootstrap & other fixes Maxim Cournoyer
2021-09-03 15:31 ` [bug#50358] [PATCH core-updates-frozen 1/8] guix: packages: Fix repacking of plain tarballs Maxim Cournoyer
2021-09-03 15:31 ` [bug#50358] [PATCH core-updates-frozen 2/8] aux-files: sitecustomize: Cleanup and add explanatory comments Maxim Cournoyer
2021-09-03 15:31 ` [bug#50358] [PATCH core-updates-frozen 3/8] gnu: glade3: Remove sitecustomize.py workaround Maxim Cournoyer
2021-09-03 15:31 ` [bug#50358] [PATCH core-updates-frozen 4/8] gnu: rust: Bootstrap rust from 1.39.0 and optimize build time Maxim Cournoyer
2021-09-03 15:31 ` Maxim Cournoyer [this message]
2021-09-14 23:40 ` [bug#50358] [PATCH core-updates-frozen 5/8] gnu: rust: Add rust 1.54 and move all non-bootstrapping logic to it Thiago Jung Bauermann via Guix-patches via
2021-09-22 1:42 ` [bug#50358] [PATCH core-updates-frozen 0/8] Shortened Rust bootstrap & other fixes Maxim Cournoyer
2021-09-28 4:05 ` Thiago Jung Bauermann via Guix-patches via
2021-09-03 15:31 ` [bug#50358] [PATCH core-updates-frozen 6/8] gnu: Build all Rust packages using the latest rustc Maxim Cournoyer
2021-09-03 15:31 ` [bug#50358] [PATCH core-updates-frozen 7/8] gnu: mozjs-78: Update to 78.13.0 Maxim Cournoyer
2021-09-03 15:31 ` [bug#50358] [PATCH core-updates-frozen 8/8] gnu: fontconfig: Add a search path for XDG_DATA_DIRS Maxim Cournoyer
2021-09-08 16:35 ` [bug#50358] [PATCH core-updates-frozen 0/8] Shortened Rust bootstrap & other fixes Ludovic Courtès
2021-09-12 2:56 ` Maxim Cournoyer
2021-09-13 8:24 ` Ludovic Courtès
2021-09-15 4:32 ` Maxim Cournoyer
2021-09-16 19:56 ` Ludovic Courtès
2021-09-03 18:47 ` [bug#50358] [PATCH core-updates-frozen 1/8] guix: packages: Fix repacking of plain tarballs Mathieu Othacehe
2021-09-08 16:27 ` [bug#50358] [PATCH core-updates-frozen 0/8] Shortened Rust bootstrap & other fixes Ludovic Courtès
2021-09-12 2:49 ` Maxim Cournoyer
2021-10-15 5:48 ` John Kehayias via Guix-patches via
2021-11-12 5:57 ` bug#50358: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210903153116.22517-5-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=50358@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).