Re: [PATCH] rust: query the compiler for dylib path
From: Tamir Duberstein
Date: Sat Oct 12 2024 - 19:53:22 EST
On Sat, Oct 12, 2024 at 7:37 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
> But before we do that, is there a way to force `rustc` to load current
> name (or trick it to do so, say, with a symlink)? i.e. can it be
> reasonably done out-of-tree without changes to the filename?
I think the problem is that rustc produces .dylib on macOS rather than
it _looking_ for .dylib; the path to the .so is fully specified in the
rustc invocation of the targets that depend on it. I don't know of a way
to control the file suffix externally.
A symlink would possibly work (unless rustc refuses to load anything
other than .dylib on macOS for whatever reason), but wouldn't be very
ergonomic; you'd have to create the symlink blind or else run the build
system until it fails, then create the symlink, and then run the build
again.