iains added a comment. In D134267#3849712 <https://reviews.llvm.org/D134267#3849712>, @dblaikie wrote:
> In D134267#3849673 <https://reviews.llvm.org/D134267#3849673>, @iains wrote: > >> >> - I do not think this patch fully addresses the issue of harmonising GCC and >> clang's command lines for modular builds (because it does not deal with >> discovery of modular code in 'normally named' sources), and my investigation >> of trying to do this in the driver suggests that it would be much more >> complex than doing it in the FE. > > Yes, that would be hard to implement in the driver - but my personal taste is > that if the compiler's going to treat the input differently, or produce > different outputs, it should be observable on the command line - either > through different flags (`-x`) or a different file extension. I think that's > been historically true? Though I realize it also comes up against "but we > have all this C++ with these existing file extensions" and especially if GCC > doesn't agree on that philosophy, Clang's going to have a hard time making a > stand there... :/ I think that ship has sailed, GCC does, indeed, already take an input like "foo.cxx" and automatically determine that it should emit a BMI as well as the .O and does so. It is (IMO, at least) reasonable to forecast that there will be proponents of both "we should have extensions to disambiguate" and " the compiler should be able to work it out standardised C++ and not force us to rename files in a strange way". The degree of support for either camp will no doubt include religious fervour ... As compiler engineers, I'd say that regardless of which view we might take for our own code, we have to cater for both. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134267/new/ https://reviews.llvm.org/D134267 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits