Re: Add llvm version into the version string

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add llvm version into the version string
Date: 2024-09-23 18:04:30
Message-ID: gwpmxsuixzrytzk5ugto4tevmxxbn26obdw63lbbjs7vnavdh2@pgv3gqgoeqdk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Sun, Sep 22, 2024 at 01:15:54PM GMT, Dmitry Dolgov wrote:
> > On Sat, Sep 21, 2024 at 05:25:30PM GMT, Tom Lane wrote:
> >
> > Is there a way to get the llvm library's version at run time? If so
> > we could consider building a new function to return that.
>
> Yes, there is a C api LLVMGetVersion to get the major, minor and patch
> numbers. The jit provider could be extended to return this information.
>
> About a new function, I think that the llvm runtime version has to be
> shown in some form by pgsql_version. The idea is to skip an emails
> exchange like "here is the bug report" -> "can you attach the llvm
> version?". If it's going to be a new separate function, I guess it won't
> make much difference to ask either to call the new function or the
> llvm-config, right?

Here is what I had in mind. It turns out the LLVMGetVersion API is
available only starting from LLVM 16, so there is need to indicate if
the version string is available (otherwise llvmjit would have to fully
format the version string).

Attachment Content-Type Size
v2-0001-Add-jit-provider-s-version-into-the-pgsql_version.patch text/plain 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-09-23 18:45:18 Re: Add llvm version into the version string
Previous Message Tom Lane 2024-09-23 17:17:02 Re: Cleaning up ERRCODE usage in our XML code