Re: [PATCH v2] Kbuild: fix issues with rustc-option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 8, 2024 at 10:23 PM Matthew Maurer <mmaurer@xxxxxxxxxx> 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.

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.

Cheers,
Miguel





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux