[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNARg=ZvD14ARKw40uk0XNfE5qgWqsrM6H4jBJu0m5XYCWQ@mail.gmail.com>
Date: Tue, 15 Oct 2024 03:45:24 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Tamir Duberstein <tamird@...il.com>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, Daniel Gomez <da.gomez@...sung.com>,
rust-for-linux@...r.kernel.org, Fiona Behrens <me@...enk.dev>,
Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
"David S. Miller" <davem@...emloft.net>, Kris Van Hees <kris.van.hees@...cle.com>,
Íñigo Huguet <ihuguet@...hat.com>,
Thomas Weißschuh <linux@...ssschuh.net>,
Vegard Nossum <vegard.nossum@...cle.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>, linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] rust: query the compiler for dylib path
On Sun, Oct 13, 2024 at 8:53 AM Tamir Duberstein <tamird@...il.com> wrote:
>
> On Sat, Oct 12, 2024 at 7:37 PM Miguel Ojeda
> <miguel.ojeda.sandonis@...il.com> 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.
rustc ignores --emit=link=rust/libmacro.so
and produces rust/libmacro.dylib.
Is this a bug in rustc?
> 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.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists