[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch core-updates updated: gnu: rust: Fix building.
From: |
guix-commits |
Subject: |
branch core-updates updated: gnu: rust: Fix building. |
Date: |
Thu, 25 Jan 2024 01:54:17 -0500 |
This is an automated email from the git hooks/post-receive script.
efraim pushed a commit to branch core-updates
in repository guix.
The following commit(s) were added to refs/heads/core-updates by this push:
new da92bca5bd gnu: rust: Fix building.
da92bca5bd is described below
commit da92bca5bd5cd2da82f66079ab411af201ba8c1b
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Jan 25 08:30:41 2024 +0200
gnu: rust: Fix building.
* gnu/packages/rust.scm (rust)[arguments]: Adjust 'unpack-compiler-rt
phase to correctly copy the sources into the target directory. Adjust
'enable-profiling phase to come after an existing phase.
[native-inputs]: Add clang-runtime-source.
Change-Id: I2e05fa86c4eaf8c2f5f3562d9f7939cd881cde3f
---
gnu/packages/rust.scm | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index c8ba29ea0f..70bb0d3d2d 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -989,13 +989,14 @@ safety and thread safety guarantees.")
out "/lib\");\n"))))))
(add-after 'unpack 'unpack-profiler-rt
;; Copy compiler-rt sources to where libprofiler_builtins looks
- ;; for its vendored copy. Keep the clang-runtime version in
- ;; sync with the LLVM version used to build Rust.
+ ;; for its vendored copy.
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "src/llvm-project/compiler-rt")
- (invoke "tar" "-xf" #$(package-source clang-runtime-15)
- "-C" "src/llvm-project/compiler-rt"
"--strip-components=1")))
- (add-after 'enable-codegen-tests 'enable-profiling
+ (copy-recursively
+ (string-append (assoc-ref inputs "clang-source")
+ "/compiler-rt")
+ "src/llvm-project/compiler-rt")))
+ (add-after 'configure 'enable-profiling
(lambda _
(substitute* "config.toml"
(("^profiler =.*$") "")
@@ -1072,10 +1073,13 @@ exec -a \"$0\" \"~a\" \"$@\""
"/lib/rustlib/src/rust/library")
(string-append bin "/.rust-analyzer-real"))))
(chmod (string-append bin "/rust-analyzer") #o755))))))))
- ;; Add test inputs.
- (native-inputs (cons* `("gdb" ,gdb/pinned)
- `("procps" ,procps)
- (package-native-inputs base-rust))))))
+ (native-inputs (cons*
+ ;; Keep in sync with the llvm used to build rust.
+ `("clang-source" ,(package-source clang-runtime-15))
+ ;; Add test inputs.
+ `("gdb" ,gdb/pinned)
+ `("procps" ,procps)
+ (package-native-inputs base-rust))))))
(define*-public (make-rust-sysroot target)
(make-rust-sysroot/implementation target rust))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch core-updates updated: gnu: rust: Fix building.,
guix-commits <=