tra added a comment.

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.

Any other ideas?


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

Reply via email to