[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
50/75: gnu: rust: Add profiling support.
From: |
guix-commits |
Subject: |
50/75: gnu: rust: Add profiling support. |
Date: |
Sun, 21 Jan 2024 13:21:48 -0500 (EST) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit 8219ab0443129c71eef83ee4bd3aae0a0a12b6f9
Author: Milkey Mouse <milkeymouse@meme.institute>
AuthorDate: Sat Jan 20 17:39:53 2024 -0500
gnu: rust: Add profiling support.
* gnu/packages/rust.scm (rust-1.52)
[phases] <unpack-profiler-rt, enable-profiling>: New phases.
Change-Id: Iecb4aef518e52f71ff7f539778bf0341288a3458
---
gnu/packages/rust.scm | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index e7d61f3729..c8ba29ea0f 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -982,11 +982,24 @@ safety and thread safety guarantees.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "src/bootstrap/builder.rs"
- ((" = rpath.*" all)
- (string-append all
- " "
- "rustflags.arg(\"-Clink-args=-Wl,-rpath="
- out "/lib\");\n"))))))
+ ((" = rpath.*" all)
+ (string-append all
+ " "
+ "rustflags.arg(\"-Clink-args=-Wl,-rpath="
+ 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.
+ (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
+ (lambda _
+ (substitute* "config.toml"
+ (("^profiler =.*$") "")
+ (("\\[build\\]") "\n[build]\nprofiler = true\n"))))
(add-after 'configure 'add-gdb-to-config
(lambda* (#:key inputs #:allow-other-keys)
(let ((gdb (assoc-ref inputs "gdb")))
@@ -1002,7 +1015,7 @@ safety and thread safety guarantees.")
(number->string
(parallel-job-count))
"1"))))
(invoke "./x.py" job-spec "build"
- "library/std" ;rustc
+ "library/std" ;rustc
"src/tools/cargo"
"src/tools/clippy"
"src/tools/rust-analyzer"
- 54/75: gnu: bluez: Update to 5.72., (continued)
- 54/75: gnu: bluez: Update to 5.72., guix-commits, 2024/01/21
- 57/75: packages: Fix repacked file name extension when zstd is unavailable., guix-commits, 2024/01/21
- 63/75: gnu: libgpg-error: Update to 1.47., guix-commits, 2024/01/21
- 64/75: gnu: libice: Update to 1.1.1., guix-commits, 2024/01/21
- 68/75: gnu: openjdk9: Make build reproducible., guix-commits, 2024/01/21
- 69/75: gnu: openjdk10: Make more reproducible., guix-commits, 2024/01/21
- 70/75: gnu: openjdk11: Make more reproducible., guix-commits, 2024/01/21
- 75/75: packages: Silence tar's support for --sort check output., guix-commits, 2024/01/21
- 39/75: gnu: xprop: Update to 1.2.6., guix-commits, 2024/01/21
- 49/75: import: go: Emit new-style package inputs., guix-commits, 2024/01/21
- 50/75: gnu: rust: Add profiling support.,
guix-commits <=
- 52/75: gnu: openjdk11: Update home page., guix-commits, 2024/01/21
- 55/75: gnu: font-fontna-yasashisa-antique: Remove input labels., guix-commits, 2024/01/21
- 59/75: gnu: python: Normalize sys.prefix in sitecustomize.py., guix-commits, 2024/01/21
- 72/75: gnu: openjdk13: Make reproducible., guix-commits, 2024/01/21
- 19/75: gnu: font-linuxlibertine: Install all license files., guix-commits, 2024/01/21
- 26/75: gnu: font-go: Install license files., guix-commits, 2024/01/21
- 27/75: gnu: font-dosis: Remove extraneous files; install license file., guix-commits, 2024/01/21
- 31/75: gnu: font-jetbrains-mono: Remove obsolete phase., guix-commits, 2024/01/21
- 37/75: gnu: libice: Update to 1.1.0., guix-commits, 2024/01/21
- 40/75: gnu: xset: Update to 1.2.5., guix-commits, 2024/01/21