Re: Guiding principle for dropping LLVM versions?

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org, Xing Guo <higuoxing(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Devrim Gündüz <devrim(at)gunduz(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Guiding principle for dropping LLVM versions?
Date: 2023-10-22 19:24:58
Message-ID: C5C97974-FB47-45AF-9DD3-30969302866A@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On October 21, 2023 7:46:17 PM PDT, Xing Guo <higuoxing(at)gmail(dot)com> wrote:
>Can we also check if the clang's version is compatible with llvm's version
>in llvm.m4? I have multiple llvm toolchains installed on my system and I
>have to specify the $CLANG and $LLVM_CONFIG variables each time I build the
>server against a toolchain that is not present in $PATH. If one of the
>variables is missing, the build system will pick up a default one whose
>version might not be compatible with the other. E.g., If we use clang-16
>and llvm-config-15, there will be issues when creating indexes for bitcodes
>at the end of installation.

It's unfortunately not that obvious to figure out what is compatible and what not. Older clang versions work, except if too old. Newer versions sometimes work. We could perhaps write a script that will find many, but not all, incompatibilities.

For the meson build I made it just use clang belonging to the llvm install - but that's very painful when building against an assert enabled llvm, clang is slower by an order of magnitude or so.

I wonder if we should change the search order to 1) CLANG, iff explicitly specified, 2) use explicitly specified or inferred llvm-config, 3) only if that didn't find clang, search path.

>wrote:
>
>> Rebased. I also noticed this woefully out of date line:
>>
>> - PGAC_PATH_PROGS(LLVM_CONFIG, llvm-config llvm-config-7
>> llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9)
>> + PGAC_PATH_PROGS(LLVM_CONFIG, llvm-config llvm-config-17
>> llvm-config-16 llvm-config-15 llvm-config-14)
>>

It's outdated, but not completely absurd - back then often no llvm-config -> llvm-config-XY was installed, but these days there pretty much always is.

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2023-10-22 21:02:45 Re: pgstatindex vs. !indisready
Previous Message Thomas Munro 2023-10-22 19:23:30 Re: Guiding principle for dropping LLVM versions?