Re: Mixing CC and a different CLANG seems like a bad idea - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Mixing CC and a different CLANG seems like a bad idea
Date
Msg-id 2925046.1637257395@sss.pgh.pa.us
Whole thread Raw
In response to Re: Mixing CC and a different CLANG seems like a bad idea  (Andres Freund <andres@anarazel.de>)
Responses Re: Mixing CC and a different CLANG seems like a bad idea
Re: Mixing CC and a different CLANG seems like a bad idea
List pgsql-hackers
Andres Freund <andres@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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Mixing CC and a different CLANG seems like a bad idea
Next
From: Thomas Munro
Date:
Subject: Re: Should rename "startup process" to something else?