[Pkg-rust-maintainers] Bug#1043311: Bug#1043311: rustc: please enable profiler builtin

Andres Salomon dilinger at queued.net
Sat Jan 13 07:42:29 GMT 2024


On Fri, 08 Sep 2023 13:35:44 -0400 Andres Salomon <dilinger at queued.net> 
wrote:
 >
 >
 > On Fri, Sep 8 2023 at 10:36:48 AM +02:00:00, Fabian Grünbichler
 > <fabian at gruenbichler.email> wrote:
 > >>  On Tue, Aug 8 2023 at 06:22:28 PM -04:00:00, Andres Salomon
 > >>
 > [...]
 > >>
 > >>  This patch adds
 > >> "cargo:rustc-link-search=/usr/lib/clang/15/lib/linux/" and
 > >>  "cargo:rustc-link-lib=static=clang_rt.profile-x86_64" (or 
whatever
 > >>  architecture it happens to be building on) to the 
profiler_builtins
 > >> build
 > >>  flags when the target matches the host. In the case where the
 > >> target is
 > >>  different from the host, it assumes a wasm build and sets
 > >>  "rustc-link-lib=static=clang_rt.builtins-wasm32" or
 > >>  "cargo:rustc-link-lib=static=clang_rt.builtins-wasm64" depending
 > >> upon
 > >>  whether the target is 32 or 64 bits, respectively.
 > >
 > > Thanks for the patch! the Windows part in d/rules looks wrong to 
me -
 > > that is built with mingw, not wasi. I assume you are not 
interested in
 > > that part, so maybe it would also be an option to guard it based on
 > > target and just build it for the regular one (or regular+wasm, but 
not
 > > windows/mingw)?
 >

After you pointed out the upstream patch on IRC 
(https://github.com/rust-lang/rust/pull/114069), I backported it to 
1.70 and tried building it. It gets pretty far, but fails late in the 
build on some tests. I'm going to do some more building (starting with 
rustc by itself without the profiler stuff, to ensure that the test 
failure I'm seeing is actually related to profiler). But in the 
meantime, here's the backported patch. If I can get it fully built, 
I'll follow up with the full debian patch or a merge request.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: profiler.patch
Type: text/x-patch
Size: 5006 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20240113/695b4dc3/attachment-0001.bin>


More information about the Pkg-rust-maintainers mailing list