hubert.reinterpretcast added a comment.

In D80300#2049679 <https://reviews.llvm.org/D80300#2049679>, @joerg wrote:

> So the general idea is that for turnkey toolchains,
>  we want to allow customizing the "default" target of the toolchain to 
> hard-code options like --sysroot, --target, -Wl,-rpath etc. Those are all 
> related, so when using a different target, they no longer make sense.


I don't think there is anything precluding the packager from setting up the 
availability of a "turnkey" multi-target toolchain (with fat binaries if 
necessary) that would still make sense to pass `--target` to.

> One way to deal with all those options in a consistent manner is hook into 
> the logic for determining the current target, if none is explicitly specified 
> on the command line or implicit from the executable name, then prepend some 
> additional flags on the command line based on some cmake variable or so. This 
> flags shouldn't trigger the unused argument warnings, so you can always pass 
> -Wl,-rpath, --sysroot etc, independent of whether the compiler is in 
> preprocessing / compile / assemble / link mode. That seems to be a more 
> general and systematic approach than adding many additional build-time 
> options.

This might make sense if we believe that the ability to add arbitrary "implied 
default target options" is not harmful. I am not certain people would agree on 
that point. The solutions do have overlap in terms of the problems they could 
be applied to, but I think each of them address some use cases that the other 
does not.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80300/new/

https://reviews.llvm.org/D80300



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to