aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-01-25 08:30:41 +0200
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:44:44 +0200
commit6c5edd3e68a4e97cdae9843152689b9b7fd3ce16 (patch)
tree8f957fffc6d8595370168e72263a78af19048c40 /gnu/packages
parentf0c22c142759a533ce9f8ce4c28f5d3b4e23fee8 (diff)
downloadguix-6c5edd3e68a4e97cdae9843152689b9b7fd3ce16.tar.gz
guix-6c5edd3e68a4e97cdae9843152689b9b7fd3ce16.zip
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
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/rust.scm22
1 files changed, 13 insertions, 9 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 344b712ff5..7cf1498ba0 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1232,13 +1232,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 =.*$") "")
@@ -1324,10 +1325,13 @@ exec -a \"$0\" \"~a\" \"$@\""
(inputs
(modify-inputs (package-inputs base-rust)
(prepend curl libffi `(,nghttp2 "lib") zlib)))
- ;; 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))