[PATCH v1 1/1] libgccjit: Add support for the weak variable attribute

via Sourceware Forge forge-bot@forge-test.rdfm.org
Tue Sep 30 16:01:11 GMT 2025


From: Antoni Boucher <bouanto@zoho.com>

gcc/jit/ChangeLog:

	* docs/topics/compatibility.rst (LIBGCCJIT_ABI_36): New ABI tag.
	* docs/topics/expressions.rst: Document gcc_jit_lvalue_add_attribute.
	* jit-playback.cc: Handle the weak attribute.
	* jit-playback.h: Add support for variable attributes without
	arguments.
	* jit-recording.cc: Handle the weak attribute.
	* jit-recording.h: Add support for variable attributes without
	arguments.
	* libgccjit.cc (gcc_jit_lvalue_add_attribute): New function.
	* libgccjit.h (gcc_jit_lvalue_add_attribute): New function.
	(GCC_JIT_VARIABLE_ATTRIBUTE_WEAK): New enum variant.
	* libgccjit.map: New function.

gcc/testsuite/ChangeLog:

	* jit.dg/all-non-failing-tests.h: Mention new test.
	* jit.dg/test-weak-var-attribute.c: New test.
---
 gcc/jit/docs/topics/compatibility.rst         |  8 +++++
 gcc/jit/docs/topics/expressions.rst           | 13 ++++++++
 gcc/jit/jit-playback.cc                       | 32 +++++++++++++++----
 gcc/jit/jit-playback.h                        |  8 +++--
 gcc/jit/jit-recording.cc                      | 20 ++++++++++++
 gcc/jit/jit-recording.h                       |  5 ++-
 gcc/jit/libgccjit.cc                          | 18 +++++++++++
 gcc/jit/libgccjit.h                           |  8 +++++
 gcc/jit/libgccjit.map                         |  5 +++
 gcc/testsuite/jit.dg/all-non-failing-tests.h  |  3 ++
 .../jit.dg/test-weak-var-attribute.c          | 31 ++++++++++++++++++
 11 files changed, 142 insertions(+), 9 deletions(-)
 create mode 100644 gcc/testsuite/jit.dg/test-weak-var-attribute.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v1-0001-libgccjit-Add-support-for-the-weak-variable-attri.patch
Type: text/x-patch
Size: 12304 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/test-list/attachments/20250930/c559efc1/attachment.bin>


More information about the Test-list mailing list