[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLgjwuGUpKogOVUL4+fUW0-xWM+3ZQ+WmSQ+J00G6+uR9bQ@mail.gmail.com>
Date: Wed, 9 Oct 2024 11:23:21 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Masahiro Yamada <masahiroy@...nel.org>, Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Matthew Maurer <mmaurer@...gle.com>, 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>,
Trevor Gross <tmgross@...ch.edu>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2] Kbuild: fix issues with rustc-option
On Tue, Oct 8, 2024 at 10:53 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Tue, Oct 8, 2024 at 10:23 PM Matthew Maurer <mmaurer@...gle.com> wrote:
> >
> > In that case we should omit `-o $$TMP`, because `rustc` is emitting a
> > warning that it's ignoring `--out-dir` because `-o` is set.
>
> Yes, we need to omit `-o` or we could use `--out-dir` together with
> one of the `--emit=X=...` types to be more explicit and avoid building
> the `.rlib`, which is what I did in the GitHub issue.
Miguel, can you link this issue? I don't think I saw it.
> IIRC I used `obj` to run most of the compiler stages just in case that
> mattered, but perhaps an even simpler one is good enough, e.g.
> `metadata`.
>
> I think just `--out-dir` should be fine and is simpler for this use
> case. However, apparently outputting to stdout works too, so we could
> do:
>
> --emit=obj=- - >/dev/null
>
> and avoid the output file altogether. We still most likely need the
> `--out-dir` in case temporaries are created.
Masahiro, are you able to clarify how to pass TMPOUT to rustc?
__rustc-option = $(call try-run2,\
$(1) $(2) $(3) --crate-type=rlib $(srctree)/rust/probe.rs
--out-dir=$(TMPOUT),$(3),$(4))
Should I use $(TMPOUT) or $$TMPOUT for this case? Right now, only TMP
is defined inside try-run. I am assuming that there is a reason for
having TMP be defined in try-run, rather than just using $(TMP)
everywhere. Does the same reason apply to TMPOUT? Should I add a
TMPOUT=$(TMPOUT) inside try-run?
Alice
Powered by blists - more mailing lists