Custom options for building extensions with --with--llvm
От | Konstantin Knizhnik |
---|---|
Тема | Custom options for building extensions with --with--llvm |
Дата | |
Msg-id | 9373f6b4-90d0-54ef-2be7-73b12476beee@postgrespro.ru обсуждение исходный текст |
Ответы |
Re: Custom options for building extensions with --with--llvm
|
Список | pgsql-hackers |
Hi, 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 So if I want to enable disk support, I am building my extension as make USE_DISK=1 clean all install and it normally works... unless Postgres is built with --enable-llvm. In this case it tries to build llvm code using clang and is not using CUSTOM_COPTS: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O3 -Wall -pthread -DIMCS_DISK_SUPPORT -fPIC -I. -I. -I../../src/include -D_GNU_SOURCE -c -o disk.o disk.c vs. /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I. -I. -I../../src/include -D_GNU_SOURCE -flto=thin -emit-llvm -c -o disk.bc disk.c I wonder is there any way to pass custom compile options to clang? Thanks in advance, -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
В списке pgsql-hackers по дате отправления: