From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 8JuCGewSt2aIKwAAqHPOHw:P1 (envelope-from ) for ; Sat, 10 Aug 2024 07:12:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8JuCGewSt2aIKwAAqHPOHw (envelope-from ) for ; Sat, 10 Aug 2024 09:12:44 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=vStG2OGl; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723273964; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9SfZiqaqQ2QnyyJEfYAtcIFgsyP0eqou2VYqzqbtqGs=; b=ReZGR3N9JH/5Km9ofP5y+rCBVtAhG3iy6D4wdsYUWxE45x9tGqocRRlJsoRIMjGq+VTtsB jM8JYnpD1iU3TXL4AlzbvONjKFLktSb1i/8cPu9YIrHrsA+fpLJXT03rvhUzm/AlkjQLoi H9yKDlG8RS2kGwqUdNusK7rL07rUFmPaKbw27esjwvWO1cMY3jN8Iwa2FcVa8bvCghmHNc jgYer9T146w7tj/UF2jXmy4bh7Zj10Z0mO8tR3zEoBp8s2vZI0uj9uu98cdBj6xciWnB0W /7Von9a3lKUeCeVlZfgp1Pq1yRyLlSaRjG7QQ3darzTlM49OSA9AWUgwKhDmSQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723273964; a=rsa-sha256; cv=none; b=Ao5UMjSbYq2/Cv8tHKHpaSTF86VMh+gLGG5jRt608lpmERaZnQC0RHzCuiszsGkL/M3Jgn XrTCdFxPlMlIr6Nv/Iusl1ONtEdys6fdjHpp6FhwPQIADBuXAX5FyA0r4GeTwY9sNxYXdN wJ3mL2yqz+W63vwebtzJ5OWQHickc4qnmrciXySfzLAYleIumscBrE6f1NGYQYIQdbK9YU ArCzqDQMok/ExS3oVgg/56WedLXTnOx4y6gTQDvLQl7YQNFEZziXc1YVMoVPTu53aez5AF 2t5HfQkaf5WY2ggM0dX0EHm0WvDg4g/pnbbPsJdAVjSzTwhPFy3UuKsFIUKmZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=vStG2OGl; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E63A97D180 for ; Sat, 10 Aug 2024 09:12:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scgHE-0003zB-1L; Sat, 10 Aug 2024 03:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scgHC-0003yB-1Q for guix-patches@gnu.org; Sat, 10 Aug 2024 03:12:34 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1scgHB-0005zs-Od for guix-patches@gnu.org; Sat, 10 Aug 2024 03:12:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=9SfZiqaqQ2QnyyJEfYAtcIFgsyP0eqou2VYqzqbtqGs=; b=vStG2OGlPCQ+oLkR7SzUQCPA8zzMDwNS1+FxiNxvDKNND0Pe59aYSEve3qAqNAE4VS2QaC7buWM8ksnOKtnqTDcIYWxg4Da3YcLTJCTJJYS0+N4R/9OmohU7Y1Y2d6YrqNZbDs0+19hzWiw7rmElQdSHiAZJwU78MDrZNt2i8CjwLntJ3dGbeIdw6vsZj+xldoDnAyxUc5zNTzKP03Pub+Na/Hd2at2r3IDanCGtejns1Lp2LBvSPssKeO5Ky8ZUwIp9Rr+yMZF/TFt+hef7EsrgxQ7gkNR4Z+HRKlSNsuKqbjJO0rtY3hF4gj+Xbft3x8vb10xF5Ywci532jkwCPg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scgHe-0004w0-Ec; Sat, 10 Aug 2024 03:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72553] [PATCH 1/4] gnu: rust: Add profiling support. References: <871q2w26ru.fsf@cbaines.net> In-Reply-To: <871q2w26ru.fsf@cbaines.net> Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Sat, 10 Aug 2024 07:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72553 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72553@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 72553-submit@debbugs.gnu.org id=B72553.172327397518928 (code B ref 72553); Sat, 10 Aug 2024 07:13:02 +0000 Received: (at 72553) by debbugs.gnu.org; 10 Aug 2024 07:12:55 +0000 Received: from localhost ([127.0.0.1]:38955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scgHW-0004v7-Mu for submit@debbugs.gnu.org; Sat, 10 Aug 2024 03:12:55 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scgHS-0004uf-Rm for 72553@debbugs.gnu.org; Sat, 10 Aug 2024 03:12:52 -0400 Received: from localhost (136.249.6.51.dyn.plus.net [51.6.249.136]) by mira.cbaines.net (Postfix) with ESMTPSA id 011F227BBE2 for <72553@debbugs.gnu.org>; Sat, 10 Aug 2024 08:11:50 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id ba281b2b for <72553@debbugs.gnu.org>; Sat, 10 Aug 2024 07:11:50 +0000 (UTC) From: Christopher Baines Date: Sat, 10 Aug 2024 08:11:44 +0100 Message-ID: <0917fd5934be09855e7baec9901fa090d98a524b.1723273907.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.99 X-Spam-Score: -5.99 X-Migadu-Queue-Id: E63A97D180 X-Migadu-Scanner: mx11.migadu.com X-TUID: gJKCKvOB2uZN From: Milkey Mouse * gnu/packages/rust.scm (rust-1.52) [phases] : 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 12529d2420..4a3ad99e88 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1216,11 +1216,24 @@ (define-public rust (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* "src/bootstrap/src/core/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"))) @@ -1236,7 +1249,7 @@ (define-public rust (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" base-commit: ce055b806eaff8fec329c30ae0deb82c50a86240 -- 2.45.2