[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl
Shivanshu Goyal via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 17:46:45 PDT 2020
shivanshu3 added a comment.
In D88680#2307564 <https://reviews.llvm.org/D88680#2307564>, @rnk wrote:
> I think the flag was originally intended to be an internal -cc1 flag not exposed to users. You should be able to work around your problem with `-Xclang -fno-pch-instantiate-templates`, btw.
>
> ----
>
> @zequanwu, can you patch this in locally and take over this patch? Please address the hasFlag comment above, add a test to clang/test/Driver, and make sure the flag works with `--driver-mode=gcc` and `--driver-mode=cl`. Follow the examples of the other tests, run clang with `-###`, and make sure this flag does or does not appear on the `-cc1` line.
Should we keep this flag internal though, or is it OK to make it a core flag? Our codebase had hundreds of compile errors caused by this default behavior which was hard to track down, so I'm guessing other people compiling with clang-cl might face similar problems? Or maybe we should re-think about making this the default behavior for clang-cl. Personally I don't have any strong preferences because we have a workaround now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88680/new/
https://reviews.llvm.org/D88680
More information about the cfe-commits
mailing list