hliao added a comment. In D68587#1698055 <https://reviews.llvm.org/D68587#1698055>, @tra wrote:
> I'm fine with this for -E/-M, > > I would argue that with `-fsyntax-only` we want to know whether our source > code, which is common for all sub-compilations, has syntactic errors. > The way we compile HIP & CUDA sources, some of the errors will only be > reported on one side of the compilation. > So, in order to make sure there are no syntax errors, we need to perform > *all* sub-compilations with `-fsyntax-only`. > > E.g. it would be rather surprising to see the compilation succeeding with > `-fsyntax-only`, but then fail with a syntax error somewhere on the device > side during a real compilation. for most compilation tools, single input and single output are expected. Without assuming `-fsyntax-only` alone is host-compilation only, that at least run syntax checking twice. The result may be misleading and there are clang-based tools (like clang-tidy) may have no legacy way to be runnable. To check device-side compilation syntax, we are still able to explicitly ask that by specifying `--cuda-device-only`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68587/new/ https://reviews.llvm.org/D68587 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits