Re: abi-compliance-checker - Mailing list pgsql-hackers

From Tristan Partin
Subject Re: abi-compliance-checker
Date
Msg-id CT5Q1YQ4X567.21JVAKGNQNBNP@gonk
Whole thread Raw
In response to Re: abi-compliance-checker  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: abi-compliance-checker
List pgsql-hackers
+abidiff = find_program('abidiff', native: false, required: false)
+abidw = find_program('abidw', native: false, required: false)
+
+abidw_flags = [
+  '--drop-undefined-syms',
+  '--no-architecture',
+  '--no-comp-dir-path',
+  '--no-elf-needed',
+  '--no-show-locs',
+  '--type-id-style', 'hash',
+]
+abidw_cmd = [abidw, abidw_flags, '--out-file', '@OUTPUT@', '@INPUT@']

It would make sense to me to mark abidiff and abidw as disabler: true.

+if abidw.found()
+  libpq_abi = custom_target('libpq.abi.xml',
+                            input: libpq_so,
+                            output: 'libpq.abi.xml',
+                            command: abidw_cmd,
+                            build_by_default: true)
+endif
+
+if abidiff.found()
+  test('libpq.abidiff',
+       abidiff,
+       args: [files('libpq.base.abi.xml'), libpq_abi],
+       suite: 'abidiff',
+       verbose: true)
+endif

With disabler: true, you can drop the conditionals. Disablers tell Meson
to disable parts of the build[0].

I also don't think it makes sense to mark the custom_targets as
build_by_default: true, unless you see value in that. I would just have
them built when the test is ran.

However, it might make sense to create an alias_target of all the ABI
XML files for people that want to interact with the files outside of the
tests for whatever reason.

[0]: https://mesonbuild.com/Reference-manual_returned_disabler.html

--
Tristan Partin
Neon (https://neon.tech)



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Potential us of initialized memory in xlogrecovery.c
Next
From: Laurenz Albe
Date:
Subject: Re: ERROR: could not determine which collation to use for string comparison