echristo added a comment. In https://reviews.llvm.org/D49148#1184957, @tra wrote:
> I wonder, what's the right thing to do to silence the warnings. For instance, > we compile everything with -Werror and the warnings result in build breaks. > > Easy way out is to pass `-Wno-unsupported-target-opt`. It works, but it does > not really solve anything. It also may mask potential other problems. > > Another alternative is to change clang driver and filter out unsupported > options so they are not passed to cc1. That will also work, but it looks > wrong, because now we have two patches that effectively cancel each other for > no observable benefit. > > Third option is to grow a better way to specify target-specific > sub-compilation options and then consider fancy debug flags to be > attributable to host compilation only. Anything beyond the "safe" subset, > would have to be specified explicitly. This also sounds awkward -- I don't > really want to replicate bunch of options times number of GPUs I'm compiling > for. That may be alleviated by providing more coarse way to group options. > E.g. we could say "these are the options for *all* non-host compilations, and > here are few specifically for sm_XY". I think @echristo and I had discussed > something like this long time ago. I think some amount of #3 is the most reasonable way forward here. Basically the compilation model of "pass the flags and hope they all work on all the targets that we're trying to compile for in this giant multiple target compile" seems to be a long tail of pain :) There are probably things we can do in the clang driver to make this a little easier, e.g. the "all non-host target options" flag you mentioned seems reasonable, but otherwise I think this is up to the user to split out flags that might not work. Thoughts? Repository: rC Clang https://reviews.llvm.org/D49148 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits