[PATCH][gcc] libgccjit: introduce version entry points

Andrea Corallo Andrea.Corallo@arm.com
Wed Jan 1 00:00:00 GMT 2020


Hi all,

I think would be quite useful for client code to be able to probe for
the libgccjit version.

This patch add three entry points for that: gcc_jit_version_major,
gcc_jit_version_minor, gcc_jit_version_patchlevel.

Does not introduce regressions running make check-jit.

Feedback are welcome.

Andrea

gcc/jit/ChangeLog
2020-??-??  Andrea Corallo  <andrea.corallo@arm.com>

	* Make-lang.in (libgccjit.o): Add dependecy plus define BASEVER.
	* docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
	plus add version paragraph.
	* libgccjit++.h (namespace gccjit::version): Add new namespace.
	* libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
	(gcc_jit_version_patchlevel): New functions.
	* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
	(gcc_jit_version_major, gcc_jit_version_minor)
	(gcc_jit_version_patchlevel): New functions.
	* libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.

gcc/testsuite/ChangeLog
2020-??-??  Andrea Corallo  <andrea.corallo@arm.com>

	* jit.dg/test-version.c: New testcase.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jit-version.patch
Type: text/x-diff
Size: 5779 bytes
Desc: jit-version.patch
URL: <http://gcc.gnu.org/pipermail/jit/attachments/20200101/daf53cdc/attachment.bin>


More information about the Jit mailing list