Re: meson: Add support for building with precompiled headers

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 09:06:42 +0200, Peter Eisentraut wrote: > On 05.10.22 21:08, Andres Freund wrote: > > This is a patch split off from the initial meson thread [1] as it's > > functionally largely independent (as suggested in [2]). > > > > Using precompiled headers substantially speeds up buildin

Re: meson: Add support for building with precompiled headers

2022-10-06 Thread Peter Eisentraut
On 05.10.22 21:08, Andres Freund wrote: This is a patch split off from the initial meson thread [1] as it's functionally largely independent (as suggested in [2]). Using precompiled headers substantially speeds up building for windows, due to the vast amount of headers included via windows.h. A

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 16:21:55 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-10-05 16:09:14 -0400, Tom Lane wrote: > >> Color me confused, but how does it work to #define that from the command > >> line if it can't be overridden from within the program? > > > If specified on the command

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Tom Lane
Andres Freund writes: > On 2022-10-05 16:09:14 -0400, Tom Lane wrote: >> Color me confused, but how does it work to #define that from the command >> line if it can't be overridden from within the program? > If specified on the commandline it's also used when generating the precompiled > header -

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 16:09:14 -0400, Tom Lane wrote: > Andres Freund writes: > > When using precompiled headers we cannot override macros in system headers > > from within .c files, as headers are already processed before the #define in > > the C file is reached. > > > A few files #define FD_SETSIZ

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Tom Lane
Andres Freund writes: > When using precompiled headers we cannot override macros in system headers > from within .c files, as headers are already processed before the #define in > the C file is reached. > A few files #define FD_SETSIZE 1024 on windows, as the default is only 64. I > am hesitant t

meson: Add support for building with precompiled headers

2022-10-05 Thread Andres Freund
oreach my $d ($module_defines->{$n}) + { + $proj->AddDefine($d); + } + } if (grep { /^$n$/ } @{$module_uselibpq}) { $proj->AddIncludeDir('src\interfaces\libpq'); -- 2.37.3.542.gdd3f6c4cae >From f051aa26e1611aa2cb80aa727e0972f27086a680 Mon Sep 17 00:00:00 2001 From: A