From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KG55CUlAMmFIQQEAgWs5BA (envelope-from ) for ; Fri, 03 Sep 2021 17:33:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SAIzBUlAMmGfbQAAB5/wlQ (envelope-from ) for ; Fri, 03 Sep 2021 15:33:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8C2CC387E for ; Fri, 3 Sep 2021 17:33:28 +0200 (CEST) Received: from localhost ([::1]:56160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMBC3-00071y-5T for larch@yhetil.org; Fri, 03 Sep 2021 11:33:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMBAn-0005Bo-6d for guix-patches@gnu.org; Fri, 03 Sep 2021 11:32:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMBAh-0005Ak-Sg for guix-patches@gnu.org; Fri, 03 Sep 2021 11:32:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mMBAh-0007VY-PP for guix-patches@gnu.org; Fri, 03 Sep 2021 11:32:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50358] [PATCH core-updates-frozen 5/8] gnu: rust: Add rust 1.54 and move all non-bootstrapping logic to it. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 Sep 2021 15:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50358 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50358@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 50358-submit@debbugs.gnu.org id=B50358.163068312028820 (code B ref 50358); Fri, 03 Sep 2021 15:32:03 +0000 Received: (at 50358) by debbugs.gnu.org; 3 Sep 2021 15:32:00 +0000 Received: from localhost ([127.0.0.1]:45766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMBAd-0007Ug-Qg for submit@debbugs.gnu.org; Fri, 03 Sep 2021 11:32:00 -0400 Received: from mail-qv1-f53.google.com ([209.85.219.53]:42969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMBAb-0007U6-Oj for 50358@debbugs.gnu.org; Fri, 03 Sep 2021 11:31:58 -0400 Received: by mail-qv1-f53.google.com with SMTP id gf5so3366570qvb.9 for <50358@debbugs.gnu.org>; Fri, 03 Sep 2021 08:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Bnp8O3V9TONYbgcHHa3rjz1C2RoIu3ck4Uyq+4sMF+k=; b=SdIDJMsp2oqaDbDxauHlr6FbcVZTlzvy7+Hu1a5LI5oC+TSQlm1DZ67n7foAfrwNAK V5DRjZLVfa7P3OKlwkM9z1hq08fZtj8tMNqPrToXYbz7yma6puRA7O6Y1xOz0RyrUtf/ JDo/kkqF5j6cqx8Nq8Y8MkTPRv1r3PWnj6NW5Se88obW/52ZQlgxSnrMxQa11TuGvkN9 uJoC+x7T9JZyEMAcK0V7gOFs73kiqVuegYaaky7kv91YfWaBourWOnMrBZ+PXdh+03p7 6/DTprApo5mrQ+PGFC2G/r8NHnJiajqFSmjIonv2s4qtDJzrFLP9P25r5xi5bAHCgCQ0 t0eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bnp8O3V9TONYbgcHHa3rjz1C2RoIu3ck4Uyq+4sMF+k=; b=L5rxNoD+daHYPnSCIeAV+QJd0jxDkXHx786PcTuZN9NV2MMIaAZaR0+Qx2DdGiDL2L 9e5QFsazje2Jqa5vBd34tuCNcnGu996T8R0gDLvubQ5QKEsyBavdndBEgZgi/IOPnF7J Y146Xur5tpROJ4nINNuIgG/UzQhrRbn90dgGtkyG1S7jOJJ6d0cqkh7D+YqulfScBzJR T7xMNYizhnndreUQcipi1qGyUCbcFT1LN2OB+88AvP/Mo/NNZN1h/gObyOBJDOBtCunZ RL1FFffe4Vb1NjhKdR3zEQzweQCU9rnYETgmsAECIGceeLt84A/saubs8JmZmNlnAMU/ SsjA== X-Gm-Message-State: AOAM532rRl/U0T0PkFD8CSKDB8K5AhxQ851y5cyRpe5O9C/CIbTucYiv PIJCrIYXh19jo07UovsrNdAaf8tlqBQ= X-Google-Smtp-Source: ABdhPJxZdNbqp9Le5EuuECCUReyq3srbwg24PjA4XN1H8feL6V/AuB1qdqdl+23f5gXdfsg7q+WZpA== X-Received: by 2002:a0c:e1cf:: with SMTP id v15mr4377668qvl.50.1630683112022; Fri, 03 Sep 2021 08:31:52 -0700 (PDT) Received: from localhost.localdomain ([207.35.94.150]) by smtp.gmail.com with ESMTPSA id b25sm3973128qka.23.2021.09.03.08.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 08:31:51 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 3 Sep 2021 11:31:13 -0400 Message-Id: <20210903153116.22517-5-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210903153116.22517-1-maxim.cournoyer@gmail.com> References: <20210903153116.22517-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630683208; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Bnp8O3V9TONYbgcHHa3rjz1C2RoIu3ck4Uyq+4sMF+k=; b=hqOOKb0tm7KRQzDhT9rLqPwbQkhltoTxYVH4gzdIKBaG1e3jK7v+Bi3NLfEq5vvdueMMKY T4uekckMyaCmBdUM7yRUCzy8HmHFT8ZTrAcIXt8/jqffk4UEKzZB9msW+IIpGXEIpuaXY2 v5pNC28uBri4ucYz7lrgDHUjClhaKUejNaSvFWOCArxBNm8r2GFMhwGzrdBr3vSRE2Nmq3 6qEJO/624ZBPDXMggm7wknpuwU4679Z/yw6nCQiWZrp1+pXyBefDXq8s1VOpYEnfd4u5oV WTgXUV0a4go5aCU83rW2g5fG+lEe17oLRlRDYNzHOAYMKLBI/4U/ERZoWqIR6A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630683208; a=rsa-sha256; cv=none; b=iVcYSsJLnu3YW2c5Qlj5KyA7lTOr5oOGafyca/XprTg3lXHWK3kYOOFoXJGX7sXPH7KLxl 7wNrS4gtv5JXl7REBk3OKydcf7nI6RvwWQir5QWZZRNyoVeQ5hZWYa824FfTOM87dY4f2n jECyaL+IYuT7zH3/iOKo2v82fR8cJ0pi6bq2T1nuPWiBxGMX2UlOmXqkhNi2hzqLZI/nxf e8L/LyU29gXmeYaA+E57VtwBRSJAo6bQcMTFA1pnPDgeRsM1c+8uXfJ/qnOsltDhXb7aT6 gM5E8XguFobwuVTqmc/dV/rkUpdT0oSyTetLr1HmsS+y17Tuy2spr28pHuZkAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SdIDJMsp; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=SdIDJMsp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8C2CC387E X-Spam-Score: 2.68 X-Migadu-Scanner: scn1.migadu.com X-TUID: 54r0AQEhCfyU * 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