Re: Custom options for building extensions with --with--llvm
От | Andres Freund |
---|---|
Тема | Re: Custom options for building extensions with --with--llvm |
Дата | |
Msg-id | 20200924183734.hnvrmmjyn7wl662s@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Custom options for building extensions with --with--llvm (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>) |
Ответы |
Re: Custom options for building extensions with --with--llvm
|
Список | 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
В списке pgsql-hackers по дате отправления: