[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#69581] [PATCH 08/11] transformations: Add support for rust.
From: |
Efraim Flashner |
Subject: |
[bug#69581] [PATCH 08/11] transformations: Add support for rust. |
Date: |
Wed, 6 Mar 2024 13:06:09 +0200 |
* guix/transformations.scm (tuning-compiler): Add support for rustc.
Change-Id: I6db596a586eda648666550cdcadaa5e1704cb79c
---
guix/transformations.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/guix/transformations.scm b/guix/transformations.scm
index 132ccd957a..f02b9f94d6 100644
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2016-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2023 Sarthak Shah <shahsarthakw@gmail.com>
-;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2023 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
;;; This file is part of GNU Guix.
@@ -499,6 +499,10 @@ (define tuning-compiler
"-Dcpu="
(string-replace-substring
#$micro-architecture "-" "_"))))
+ ((and (search-next "rustc")
+ (string=? next (search-next "rustc")))
+ (list "-C" (string-append "target_cpu="
+ #$micro-architecture)))
(else
(list (string-append "-march="
#$micro-architecture))))))))))))
@@ -519,7 +523,7 @@ (define tuning-compiler
(symlink #$program
(string-append bin "/" program)))
'("cc" "gcc" "clang" "g++" "c++" "clang++"
- "go" "zig")))))))
+ "go" "rustc" "zig")))))))
(define (build-system-with-tuning-compiler bs micro-architecture)
"Return a variant of BS, a build system, that ensures that the compiler that
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
- [bug#69581] [PATCH 11/11] gnu: clang-properties: Add micro-architecture support for powerpc64le., (continued)
[bug#69581] [PATCH 08/11] transformations: Add support for rust.,
Efraim Flashner <=
[bug#69581] [PATCH 04/11] guix: cpu: Rename x86-64-v1 to x86-64., Efraim Flashner, 2024/03/06
Message not available