Andres Freund <and...@anarazel.de> writes: > On 2021-11-18 11:56:59 -0500, Tom Lane wrote: >> Why did we not simply insist that if you want to use --with-llvm, the >> selected compiler must be clang? I cannot see any benefit of mix-and-match >> here.
> It also just seems architecturally wrong: People pressed for making the choice > of JIT runtime replaceable, and it now is, at some pain. And forcing the main > compiler seems problematic from that angle. OK, I concede that's a reasonable concern. So we need to look more carefully at how the switches for CLANG are being selected. > I think the issue is more with trying to be miserly in the choice of compiler > flag tests to duplicate and how many places to change to choose the right flag > variable. It's taken a while for this to become a real issue, so it perhaps > was the right choice at the time. Yeah. I'm inclined to think we ought to just bite the bullet and fold CLANG/CLANGXX into the main list of compiler switch probes, so that we check every interesting one four times. That sounds fairly horrid, but as long as you are using an accache file it's not really going to cost that much. (BTW, does meson have any comparable optimization? If it doesn't, I bet that is going to be a problem.) regards, tom lane