From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KBcZEYmMrWBHhwAAgWs5BA (envelope-from ) for ; Wed, 26 May 2021 01:47:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iO3hDImMrWCvHwAAB5/wlQ (envelope-from ) for ; Tue, 25 May 2021 23:47:21 +0000 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 B6BBD1BCCA for ; Wed, 26 May 2021 01:47:20 +0200 (CEST) Received: from localhost ([::1]:49456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llg6m-0000tN-JK for larch@yhetil.org; Tue, 25 May 2021 19:05:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llg6g-0000mI-Ne for guix-patches@gnu.org; Tue, 25 May 2021 19:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llg6g-0000Cu-F0 for guix-patches@gnu.org; Tue, 25 May 2021 19:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llg6g-0005Xk-9g for guix-patches@gnu.org; Tue, 25 May 2021 19:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48525] [PATCH core-updates 2/2] gnu: rust: Add profiling support. Resent-From: Milkey Mouse Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 May 2021 23:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48525 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48525@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162198386221251 (code B ref -1); Tue, 25 May 2021 23:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 May 2021 23:04:22 +0000 Received: from localhost ([127.0.0.1]:47296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llg62-0005Wh-Cf for submit@debbugs.gnu.org; Tue, 25 May 2021 19:04:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:33994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llg5o-0005W9-Dp for submit@debbugs.gnu.org; Tue, 25 May 2021 19:04:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llg5o-0007Kf-6l for guix-patches@gnu.org; Tue, 25 May 2021 19:04:08 -0400 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llg5m-000837-5l for guix-patches@gnu.org; Tue, 25 May 2021 19:04:07 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1621983840; cv=none; d=zohomail.com; s=zohoarc; b=ctdUuiK5izUKmg/sc0finYVZI+yygbhwqXMvZUNs7i+DDjkRA0xAeGL6ORKH2rYp8XwI9j98xRWVloT/MGXZNJgxh1ec8JnVKJqD2kF704VyHlmrBBzUqRUOB+Mwq+1eWQJbLHU/rMX9/x7/OgpQJzVzoG3H+MDaANHYnCsSH4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621983840; h=Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=4mECu+jCSTRYWXjkJ9CmW6RjxRfjSuqrg8tl/R5D1JQ=; b=btZhJCiI3v72pFPFZCB+AkqtE0rheoQtDvSGJ5ya9NHwKJPBX0xr4LFfxW79mUXzT7tTNnFpDbrpKi53ChJK/0petoPjb3YU046zZUuT72pL2SCtZTdwvcaMBg6T5kbw05fg4FDmIb05MYFCRH2HAUFLV5a3L8OE18xasuXikQg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=meme.institute; spf=pass smtp.mailfrom=milkeymouse@meme.institute; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1621983840; s=memelord; d=meme.institute; i=milkeymouse@meme.institute; h=From:To:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=4mECu+jCSTRYWXjkJ9CmW6RjxRfjSuqrg8tl/R5D1JQ=; b=D9oBW9fvvoZPN57OZ1gKS+vlQVDLBLTTHJZjdcOvO1xIDDpshHgxxfZPMeEpebgy /c/NPmLuUGTw/ldE3TinyTildbDiAAylJEgOyXXoEBPFVQksOymxyUGBjnFQZup5uCj q9WnCHg8I73AVmQEgVtayXQo0Zs6lEPwDL1zrwHw= Received: from jupiter.local (50.47.115.222 [50.47.115.222]) by mx.zohomail.com with SMTPS id 1621983837795549.2808469770839; Tue, 25 May 2021 16:03:57 -0700 (PDT) From: Milkey Mouse Date: Tue, 25 May 2021 16:03:50 -0700 Message-Id: <20210525230350.542603-2-milkeymouse@meme.institute> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210525230350.542603-1-milkeymouse@meme.institute> References: <20210519183749.32709-1-milkeymouse@meme.institute> <20210525230350.542603-1-milkeymouse@meme.institute> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.54; envelope-from=milkeymouse@meme.institute; helo=sender4-of-o54.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621986440; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=4mECu+jCSTRYWXjkJ9CmW6RjxRfjSuqrg8tl/R5D1JQ=; b=slhRUR3to6Qu6N7dCm+SaywoAWeeViI6NjHcd++XxcWf8Zg7gwe1LJamsPH1r747HfZES2 uJgFnzighQpeUKaKhqS79UTRgOCdEo35ysnqI/QwpUzDSY5LzjNYH95YH6T7j50wU3Oqv7 oCLpsMbzkiSJGwGcY5lYHz92Dzf8rnmA2q4JvRnGQHNuYta7dHzgI27KOEbNWfs5s3cdgl tt3uetqrFAPs636x524hyXaOU3lGttA8zLmWhKJ7q5KKoniPNLOpEQ5+pPE8G5L9kEW/9Q SBMLQUKki/mJEbcANrAMCkLYwoYo2JM/Pa3OCOLNh/jqZbyTKr4CSjNemx1TEw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1621986440; a=rsa-sha256; cv=fail; b=br7Ywc2EgTBrHyL2V2o8hqsnZvklEN3ojBHd6ufEFc0LNMCb8HPpGE7waL5XUZnfNWbQiq M6xs7GdWRLmzS/kYY4B6m0xPimrwg843KJYPq8seJ4qCSY22It+IGgD9uT2LmvR+z1gY4b x66LM8+04Y//GC3Eym/9wtCoQg4ooCydoStQSwFAkbsjAVbWPFNKD+aRA89bM5MkdAhq1J 9zgCIptD94E4G/PJM12y5qs09g+Z3ELX6HRAgrXUEPdz3e6kd8A5j//RZryyhWtAWb2xeK G82aZW6FG1Gf+D4Vay9cfjU/+VkZnG1I2GuBggP0hQFNvRjMfL+iiOxooW/lrQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=meme.institute header.s=memelord header.b=D9oBW9fv; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 7.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=meme.institute header.s=memelord header.b=D9oBW9fv; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: B6BBD1BCCA X-Spam-Score: 7.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: wwCGHcu+Hwut * gnu/packages/rust.scm (rust-1.52) [phases]{unpack-profiler-rt, enable-profiling}: New phases. [native-inputs]{compiler-rt-source}: New input. --- gnu/packages/rust.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 6b769bfab2..7b77d791d1 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -853,7 +853,29 @@ safety and thread safety guarantees.") (inherit base-rust) (inputs (alist-replace "llvm" (list llvm-12) - (package-inputs base-rust)))))) + (package-inputs base-rust))) + ;; Add compiler-rt-source for libprofiler_builtins (needed for profiling + ;; support), which normally vendors its own copy of compiler-rt. + (native-inputs (cons* + `("compiler-rt-source" ,(package-source clang-runtime-12)) + (package-native-inputs base-rust))) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'unpack-profiler-rt + ;; Copy compiler-rt sources to where libprofiler_builtins + ;; looks for its vendored copy. + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "src/llvm-project/compiler-rt") + (invoke "tar" "-xf" (assoc-ref inputs "compiler-rt-source") + "-C" "src/llvm-project/compiler-rt" "--strip-components=1") + #t)) + (add-after 'enable-codegen-tests 'enable-profiling + (lambda _ + (substitute* "config.toml" + (("^profiler =.*$") "") + (("[[]build[]]") "\n[build]\nprofiler = true\n"))))))))))) ;;; Note: Only the latest versions of Rust are supported and tested. The ;;; intermediate rusts are built for bootstrapping purposes and should not -- 2.31.1