Re: Custom options for building extensions with --with--llvm

From: Andres Freund <andres(at)anarazel(dot)de>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Custom options for building extensions with --with--llvm
Date: 2020-09-24 18:37:34
Message-ID: 20200924183734.hnvrmmjyn7wl662s@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2020-09-24 19:15:22 +0300, Konstantin Knizhnik wrote:
> In my extension I want to define some custom options for compiler.
> I do it in the following way:
>
> ifdef USE_DISK
> CUSTOM_COPT += -DIMCS_DISK_SUPPORT
> endif

Why aren't you adding it to PG_CPPFLAGS? That should work, and I think
that's what several contrib modules are using.

My understanding of CUSTOM_COPT is that it's for use in Makefile.custom,
not for contrib modules etc?

> I wonder is there any way to pass custom compile options to clang?
> Thanks in advance,

It probably wouldn't hurt to add COPT that to the respective rules in
Makefile.global.in in some way. Shouldn't be too hard to do, if you want
to write a patch. Probably just apply it to BITCODE_CFLAGS as well.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2020-09-24 18:49:50 Re: proposal: schema variables
Previous Message Peter Eisentraut 2020-09-24 17:56:43 Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2