postgresql/src/common
Andres Freund e6927270cd meson: Add initial version of meson based build system
Autoconf is showing its age, fewer and fewer contributors know how to wrangle
it. Recursive make has a lot of hard to resolve dependency issues and slow
incremental rebuilds. Our home-grown MSVC build system is hard to maintain for
developers not using Windows and runs tests serially. While these and other
issues could individually be addressed with incremental improvements, together
they seem best addressed by moving to a more modern build system.

After evaluating different build system choices, we chose to use meson, to a
good degree based on the adoption by other open source projects.

We decided that it's more realistic to commit a relatively early version of
the new build system and mature it in tree.

This commit adds an initial version of a meson based build system. It supports
building postgres on at least AIX, FreeBSD, Linux, macOS, NetBSD, OpenBSD,
Solaris and Windows (however only gcc is supported on aix, solaris). For
Windows/MSVC postgres can now be built with ninja (faster, particularly for
incremental builds) and msbuild (supporting the visual studio GUI, but
building slower).

Several aspects (e.g. Windows rc file generation, PGXS compatibility, LLVM
bitcode generation, documentation adjustments) are done in subsequent commits
requiring further review. Other aspects (e.g. not installing test-only
extensions) are not yet addressed.

When building on Windows with msbuild, builds are slower when using a visual
studio version older than 2019, because those versions do not support
MultiToolTask, required by meson for intra-target parallelism.

The plan is to remove the MSVC specific build system in src/tools/msvc soon
after reaching feature parity. However, we're not planning to remove the
autoconf/make build system in the near future. Likely we're going to keep at
least the parts required for PGXS to keep working around until all supported
versions build with meson.

Some initial help for postgres developers is at
https://wiki.postgresql.org/wiki/Meson

With contributions from Thomas Munro, John Naylor, Stone Tickle and others.

Author: Andres Freund <andres@anarazel.de>
Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Author: Peter Eisentraut <peter@eisentraut.org>
Reviewed-By: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Discussion: https://postgr.es/m/20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de
2022-09-21 22:37:17 -07:00
..
unicode meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
.gitignore
archive.c
base64.c
checksum_helper.c
compression.c Simplify handling of compression level with compression specifications 2022-09-14 12:16:57 +09:00
config_info.c Assorted examples of expanded type-safer palloc/pg_malloc API 2022-09-12 08:45:03 +02:00
controldata_utils.c Assorted examples of expanded type-safer palloc/pg_malloc API 2022-09-12 08:45:03 +02:00
cryptohash_openssl.c
cryptohash.c
d2s_full_table.h
d2s_intrinsics.h
d2s.c
digit_table.h
encnames.c
exec.c Clean up inconsistent use of fflush(). 2022-08-29 13:55:41 -04:00
f2s.c
fe_memutils.c Remove redundant null pointer checks before free() 2022-07-03 11:47:15 +02:00
file_perm.c
file_utils.c Replace pgwin32_is_junction() with lstat(). 2022-08-06 12:50:59 +12:00
hashfn.c
hmac_openssl.c
hmac.c
ip.c Don't bother to set sockaddr_un.sun_len. 2022-08-24 00:09:37 +12:00
jsonapi.c Speed up lexing of long JSON strings 2022-09-02 09:36:22 +07:00
keywords.c
kwlookup.c
link-canary.c
logging.c
Makefile
md5_common.c
md5_int.h
md5.c
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_get_line.c
pg_lzcompress.c
pg_prng.c
pgfnames.c
protocol_openssl.c
psprintf.c
relpath.c Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
restricted_token.c Replace load of functions by direct calls for some WIN32 2022-09-09 10:52:17 +09:00
rmtree.c
ryu_common.h
saslprep.c
scram-common.c
sha1_int.h
sha1.c
sha2_int.h
sha2.c
sprompt.c
string.c pg_clean_ascii(): escape bytes rather than lose them 2022-09-13 16:10:44 +02:00
stringinfo.c
unicode_norm.c
username.c
wait_error.c
wchar.c Treat Unicode codepoints of category "Format" as non-spacing 2022-09-13 16:13:33 +07:00