diff options
author | Andres Freund | 2022-09-27 19:01:35 +0000 |
---|---|---|
committer | Andres Freund | 2022-09-29 01:48:19 +0000 |
commit | dfefa0e46433a2c798281826f8501895f3fa2a71 (patch) | |
tree | 4cfa61b66677c2f258e94080304a3fe5433733b7 /src | |
parent | e3a892539b2baabc1963c31605728bbbc8f8b89a (diff) |
meson: pg_regress: Define a HOST_TUPLE sufficient to make resultmap work
This doesn't end up with a triple that's exactly the same as config.guess -
it'd be hard to achieve that and it doesn't seem required. We can't rely on
config.guess as we don't necessarily have a /bin/sh on windows, e.g., when
building on windows with msvc.
This isn't perfect, e.g., clang works on windows as well. But I suspect we'd
need a bunch of other changes to make clang on windows work, and we haven't
supported it historically.
Discussion: http://postgr.es/m/20220928022724.erzuk5v4ai4b53do@awork3.anarazel.de
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/meson.build | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/test/regress/meson.build b/src/test/regress/meson.build index fd8ee995b79..03de591b0c7 100644 --- a/src/test/regress/meson.build +++ b/src/test/regress/meson.build @@ -6,7 +6,16 @@ regress_sources = pg_regress_c + files( 'pg_regress_main.c' ) -pg_regress_cflags = ['-DHOST_TUPLE="frak"', '-DSHELLPROG="/bin/sh"'] +# Need make up something roughly like x86_64-pc-mingw64. resultmap matches on +# patterns like ".*-.*-mingw.*". We probably can do better, but for now just +# replace 'gcc' with 'mingw' on windows. +host_tuple_cc = cc.get_id() +if host_system == 'windows' and host_tuple_cc == 'gcc' + host_tuple_cc = 'mingw' +endif +host_tuple = '@0@-@1@-@2@'.format(host_cpu, host_system, host_tuple_cc) + +pg_regress_cflags = ['-DHOST_TUPLE="@0@"'.format(host_tuple), '-DSHELLPROG="/bin/sh"'] pg_regress = executable('pg_regress', regress_sources, |