[PATCH][gcc] libgccjit: introduce gcc_jit_context_add_driver_option

Andrea Corallo Andrea.Corallo@arm.com
Fri Jan 18 19:25:00 GMT 2019


Hi all,
this patch add gcc_jit_context_add_driver_option to the libgccjit ABI and a testcase for it.

Using this interface is now possible to pass options affecting assembler and linker.

Does not introduce any new regression running make check-jit.

Bests

  Andrea


gcc/jit/ChangeLog
2019-01-16  Andrea Corallo  andrea.corallo@arm.com

* docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
* docs/topics/contexts.rst (Additional driver options): New
section.
* jit-playback.c (invoke_driver): Add call to append_driver_options.
* jit-recording.c: Within namespace gcc::jit...
(recording::context::~context): Free the optnames within
m_driver_options.
(recording::context::add_driver_option): New method.
(recording::context::append_driver_options): New method.
(recording::context::dump_reproducer_to_file): Add driver
options.
* jit-recording.h: Within namespace gcc::jit...
(recording::context::add_driver_option): New method.
(recording::context::append_driver_options): New method.
(recording::context::m_driver_options): New field.
* libgccjit++.h (gccjit::context::add_driver_option): New
method.
* libgccjit.c (gcc_jit_context_add_driver_option): New API
entrypoint.
* libgccjit.h (gcc_jit_context_add_driver_option): New API
entrypoint.
(LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
macro.
* libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.


gcc/testsuite/ChangeLog
2019-01-16  Andrea Corallo  andrea.corallo@arm.com

* jit.dg/add-driver-options-testlib.c: Add support file for
test-add-driver-options.c testcase.
* jit.dg/all-non-failing-tests.h: Add test-add-driver-options.c
* jit.dg/jit.exp (jit-dg-test): Update to support
add-driver-options-testlib.c compilation.
* jit.dg/test-add-driver-options.c: New testcase.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc_jit_context_add_driver_option_no_changelog.patch
Type: text/x-diff
Size: 12765 bytes
Desc: gcc_jit_context_add_driver_option_no_changelog.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190118/ad03075c/attachment.bin>


More information about the Gcc-patches mailing list