all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 72553@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#72553] [PATCH 2/4] gnu: rust: Fix building.
Date: Sat, 10 Aug 2024 08:11:45 +0100	[thread overview]
Message-ID: <e23ef248c5338db98225ba2ec305db5bc16ced11.1723273907.git.mail@cbaines.net> (raw)
In-Reply-To: <0917fd5934be09855e7baec9901fa090d98a524b.1723273907.git.mail@cbaines.net>

From: Efraim Flashner <efraim@flashner.co.il>

* 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 4a3ad99e88..fe503b0d5f 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1223,13 +1223,14 @@ (define-public rust
                                      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 =.*$") "")
@@ -1315,10 +1316,13 @@ (define-public rust
       (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))
-- 
2.45.2





  reply	other threads:[~2024-08-10  7:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-10  7:09 [bug#72553] [PATCH rust-team 0/4] Several patches removed from core-updates Christopher Baines
2024-08-10  7:11 ` [bug#72553] [PATCH 1/4] gnu: rust: Add profiling support Christopher Baines
2024-08-10  7:11   ` Christopher Baines [this message]
2024-08-10  7:11   ` [bug#72553] [PATCH 3/4] gnu: rust: Use gexps; fix enable-profiling phase Christopher Baines
2024-08-10  7:11   ` [bug#72553] [PATCH 4/4] gnu: rust: Disable token_not_logged test Christopher Baines

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e23ef248c5338db98225ba2ec305db5bc16ced11.1723273907.git.mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=72553@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.