Re: [PATCH v7 21/25] Kbuild: add Rust support

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

 



On Mon, May 23, 2022 at 8:45 PM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
>
> I'm super not into having the rust optimization level differ from the
> C optimization level.  This is just someone having too much fun
> wrapping every compiler flag in a kbuild option.  Either folks wan't

I mean, `Makefile`s are not my favorite pastime... :)

> smaller size or more optimizations. Allowing for RUST_OPT_LEVEL_S and
> CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE or RUST_OPT_LEVEL_3 and
> CONFIG_CC_OPTIMIZE_FOR_SIZE is just wacky nonsense that's going to
> make randconfig bug reports more confusing to tease out.

I think what is important is to decide whether extra levels, for C and
Rust, should be kept compile-able/maintained or not (I also replied in
the `-O1` for C thread [1]).

Note that the Rust side can be compiled as `-O0` or `-O1` at the
moment, which is something we do not have for the C side; thus having
only the C == Rust option means we will not have a configuration with
those anymore.

For me it is less complex to not have them, and I have not heard more
opinions on this, either for or against (apart from that thread
suggesting `-O1` for the C side), so if nobody else chimes in, I will
remove them.

[1] https://lore.kernel.org/lkml/CANiq72kySVvOQ7eqwe0Jzz3V0JTtrcqODHR9Ty4-sfDMdzP6XQ@xxxxxxxxxxxxxx/

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