Meinersbur wrote:

Thanks for the everview of clang/gcc behavior (I assume it is LLVM-produced?)

> A header-only command line producing a PCH there is incidental, and adding 
> linker options to it has no guaranteed behavior,

This claim needs evidence. Something cannot be "incidental" that has been 
documented as such. In any case, due to being possible with gcc and clang since 
forever, it is set in stone.

The motivation for this was a build system that broke when passing additional 
linker arguments that it happened to also pass to the precompile line. It seems 
to not have even worked with gcc, so the primary motivation for this PR is 
gone. The build system needs to be fixed instead and I am going to close 
#218802.

I considered that adding a linker option was triggering linking was just an 
artifact of how Clang categorizes linker options as "input". I did not even 
consider that gcc would do the same. I still find it counterintuitive, 
especially since it will predictably fail, irrespective to what gcc does, but 
does not warrant a bigger discussion. 

https://github.com/llvm/llvm-project/pull/218802
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to