From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id +BODEcBMrGWJ2gAAqHPOHw:P1 (envelope-from ) for ; Sat, 20 Jan 2024 23:44:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id +BODEcBMrGWJ2gAAqHPOHw (envelope-from ) for ; Sat, 20 Jan 2024 23:44:16 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=UX6Yxv40; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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=1705790656; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-to: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=eF7hQHDYA71HUIojdG43/uhg8PJoZzoDcaADvBIRrNg=; b=KWjuTJjTWxF9ruCtDa43I69+Hhp3tbSrT4K5CULtJd8ftiskgOLm4iLoOdXFgo6JFfnO2W aAMuQCva5yvh6iIGro/DpKidwYPvZaGhVt4wHrrunQNSef+zcXWbLw4V7tlrYF/h4fsCIf PptaGnZmrzKPk5Tu8OP+Oa+33SjizQYA3fuawC0uycW7bPvec4/Jooe5sqjHlCtNQQSsLo DeFTtsHnAcohwKGQePvX4Asb4Ce/BrHZHNNJRbWnx+6YzDiYzVB0U/v3dZKI2mCr5TqecA nHiX6chiLD4wO1uGQTyMcnC6sPLTVa0xJAnFSLwr4dMezs2GLoG3UF3BYk392Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=UX6Yxv40; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Seal: i=1; s=key1; d=yhetil.org; t=1705790656; a=rsa-sha256; cv=none; b=r5ISPv5YOb7C/PSfvgxH0XZOp0kAK/Z0XTk3GXV05GXGBmyqlrMrM4Pb3hvzKvLrqJz42t SHvw6MwcctQQXBHfmdphS8pL4abv0j0Plav7JlmXEIOtmLwcoDTJydncuBHJnTtplrH71i 1qjO/+jkB89/Ju3SKMBYUyic+l+ZfuBe2VodJ1Ruxi+EYUARAXYpoPmMaQCnUivm022hfB oq45+wr6GkE8GGVitKnXRmhNepQIpyQwIiGUiytF5pYWesRZIpeCRRk6oxDisoNcTDM3is H1dk+dKzf9QNfg5uFwQe/ZEiV2PzinA8q7TxqBJFxlDq4FMt0GnJUUYDmsZv7A== 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 BEEF125578 for ; Sat, 20 Jan 2024 23:44:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRK4G-0005Nn-Vy; Sat, 20 Jan 2024 17:44:01 -0500 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 1rRK4F-0005NJ-7X for guix-patches@gnu.org; Sat, 20 Jan 2024 17:43:59 -0500 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 1rRK4E-0005D2-Vb for guix-patches@gnu.org; Sat, 20 Jan 2024 17:43:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rRK4I-0004wH-0F for guix-patches@gnu.org; Sat, 20 Jan 2024 17:44:02 -0500 Subject: bug#48525: [PATCH core-updates] gnu: rust: Add profiling support. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sat, 20 Jan 2024 22:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48525 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Milkey Mouse Cc: Marius Bakke , 48525-done@debbugs.gnu.org Mail-Followup-To: 48525@debbugs.gnu.org, maxim.cournoyer@gmail.com, milkeymouse@meme.institute Received: via spool by 48525-done@debbugs.gnu.org id=D48525.170579058418887 (code D ref 48525); Sat, 20 Jan 2024 22:44:01 +0000 Received: (at 48525-done) by debbugs.gnu.org; 20 Jan 2024 22:43:04 +0000 Received: from localhost ([127.0.0.1]:36089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRK3M-0004uZ-7X for submit@debbugs.gnu.org; Sat, 20 Jan 2024 17:43:04 -0500 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:61783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRK3J-0004u4-QA for 48525-done@debbugs.gnu.org; Sat, 20 Jan 2024 17:43:03 -0500 Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-683cabd9763so12019246d6.3 for <48525-done@debbugs.gnu.org>; Sat, 20 Jan 2024 14:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705790573; x=1706395373; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eF7hQHDYA71HUIojdG43/uhg8PJoZzoDcaADvBIRrNg=; b=UX6Yxv40uSMHeZcz/7wUvwckdFqxSjQ1ylFMvZqoHhljYETmUAjb8Wpe7F8/XqVQso jmiZp3DCUSNtqiB6YIq2XTFX2tM1hCOe7dbbIcEo5b7vE2qyFh+7JNfkCfrfxCoqbtSX ouxkqTrupxLkb3NB5xcicbMS1/z20ksJkw8O4tK03hVF9W1+WnyBQsPUE5WjmaieNBH/ Cw0WmTKpaaBN67hZ9geqxlb5MLJTNE4kWKL5v6tnM4xcKajXbRl9xJxUTAuPqd9MQ/GI 19WCdMMWGCfcPlwZNNSXjx8Xoe4cK2Kg9bkJRI3l/JtKDmQaM45H2hBbr8MDmcgPkWzR OLng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705790573; x=1706395373; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eF7hQHDYA71HUIojdG43/uhg8PJoZzoDcaADvBIRrNg=; b=NCGOG2Za7ywEHGpdM+yBl5tT4aDqIB12hQrPjTXVkvwvI6vSuZO6NzC9fcjSSVmxK/ oMUuzJjfjfFNKK8JGa/wQHwz4v7mRAdFY293jeHoZdg+ikGF57mvhrO6nTXBmjCO8Xfm b9sbghHfvniyxyc8aGjbHuThkW3NdDKz1JSIenjEP+nOIOnaVYCEBZTSF8jMous/xR2i 9XBIN1nCdfxztAqTO0PySbgSYIRWpX/IIuvcIo53VmMC/2+uUNms0M38MxVevvLbNOt7 Y9RO8zjDXSSBOk2m9zSdxlvTxt5QyEQdJvIabeXt9ASxpIChDeFRRKThtMfNzVLOoaiu eL8w== X-Gm-Message-State: AOJu0Yy1TDCiyyXbnCVvfN7PrpwYBFrdZOO32IE/VKAlYdbkHDYi00pG rjdY79FdjxZtfmtB7+J0QHlwjI4O4FPhl/+IJR5fM06yZri9l/13Z7TWYkGPGto= X-Google-Smtp-Source: AGHT+IFpBq9B0thzM/NQv7DPvE1c5OQsbucsb+VSRStQ/9DI5n2k3yGgv2XTcmyrjPQYvMTSl3CSMw== X-Received: by 2002:a0c:cb8d:0:b0:681:86ed:b8bd with SMTP id p13-20020a0ccb8d000000b0068186edb8bdmr1977975qvk.61.1705790573110; Sat, 20 Jan 2024 14:42:53 -0800 (PST) Received: from hurd (dsl-10-128-232.b2b2c.ca. [72.10.128.232]) by smtp.gmail.com with ESMTPSA id v3-20020a0ced43000000b006843f949b29sm980166qvq.16.2024.01.20.14.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 14:42:52 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <20210525230350.542603-2-milkeymouse@meme.institute> (Milkey Mouse's message of "Tue, 25 May 2021 16:03:50 -0700") References: <20210519183749.32709-1-milkeymouse@meme.institute> <20210525230350.542603-1-milkeymouse@meme.institute> <20210525230350.542603-2-milkeymouse@meme.institute> Date: Sat, 20 Jan 2024 17:42:51 -0500 Message-ID: <871qabd3tg.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain 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: 2.32 X-Spam-Score: 2.32 X-Migadu-Queue-Id: BEEF125578 X-Migadu-Scanner: mx12.migadu.com X-TUID: Rll9ywiF8BLL Hi, Milkey Mouse writes: > * 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 I've ported this change to our current rust (using clang-runtime-15 to match the llvm version used) and added it to the queued changes I'll push shortly. -- Thanks, Maxim