Re: LLVM compile failing in seawasp - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: LLVM compile failing in seawasp
Date
Msg-id alpine.DEB.2.21.1907282141360.25871@lancre
Whole thread Raw
In response to Re: LLVM compile failing in seawasp  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: LLVM compile failing in seawasp  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
Hello Tom,

>> They should be fully independent anyway, so the order should
>> not matter?
>
> On what grounds do you claim that's true anywhere, let alone
> everywhere?

I mean that the intersection of Postgres realm, a database written in C, 
and LLVM realm, a compiler written in C++, should not interfere much one 
with the other, bar the jit compilation stuff which mixes both, so having 
one set of realm-specific includes before/after the other *should* not 
matter.

Obviously the Min macro is a counter example of that, but that is indeed 
the problem to solve, and it is really accidental. It would be very 
unlucky if there was an issue the other way around. But maybe not.

Anyway, I'm just trying to suggest a minimum fuss solution. One point of 
"seawasp" and "jellyfish" is to have early warning of compilation issues 
with future compilers, and it is serving this purpose beautifully. Another 
point is to detect compiler bugs early when compiling a significant 
project, and I have reported issues about both clang & gcc in the past, so 
it works there too.

If reordering includes is not an option, too bad. Then "#undef Min" which 
I find disputable, allthough I've done much worse... it might or might not 
work depending on what is done afterwards. Or rename the macro, as I 
suggested first, but there are many instances. Or convince LLVM people 
that they should change their stuff. Or document that pg jit will cannot 
use the latest LLVM, as a feature. Or find another solution:-)

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to run encoding-dependent tests by default
Next
From: Brandur Leach
Date:
Subject: Re: Patch for SortSupport implementation on inet/cdir