JIT versus standalone-headers checks - Mailing list pgsql-hackers

From Tom Lane
Subject JIT versus standalone-headers checks
Date
Msg-id 28392.1528660744@sss.pgh.pa.us
Whole thread Raw
Responses Re: JIT versus standalone-headers checks
List pgsql-hackers
I find that the JIT stuff has broken cpluspluscheck for me, along
with a related script that I use to verify that each header builds
cleanly standalone (ie with no prerequisites except postgres.h).
There are two problems:

(1) Doesn't work on a platform without the llvm header files:

./src/include/jit/llvmjit.h:18:26: error: llvm-c/Types.h: No such file or directory
followed by a lot of complaints like
./src/include/jit/llvmjit.h:60: error: 'LLVMTypeRef' does not name a type

It seems like a reasonable fix for that is to wrap the contents of these
headers in "#ifdef USE_LLVM" ... do you see a reason not to?

(2) This seems to need re-thought:

./src/include/jit/llvmjit.h:15:2: error: #error "llvmjit.h should only be included by code dealing with llvm"

I don't especially see the value of this #error, especially if we are
wrapping this whole header in "#ifdef USE_LLVM", and propose to just
remove it.

Thoughts?

            regards, tom lane


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: PostgreSQL vs SQL Standard
Next
From: Tom Lane
Date:
Subject: Re: why partition pruning doesn't work?