libgccjit: introduce gcc_jit_context_add_driver_option
authorAndrea Corallo <andrea.corallo@arm.com>
Tue, 5 Feb 2019 22:11:04 +0000 (22:11 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 5 Feb 2019 22:11:04 +0000 (22:11 +0000)
commit216090cc0fb7dc4de5fa9176860c845d5646c6b7
treed96fc32551e87c9cf55bc83adb77634a87c64af6
parent6fc4ecbc55bbf1995513102bba88a934b51a146b
libgccjit: introduce gcc_jit_context_add_driver_option

gcc/jit/ChangeLog:
2019-02-05  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-02-05  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 note about
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.

From-SVN: r268563
15 files changed:
gcc/jit/ChangeLog
gcc/jit/docs/topics/compatibility.rst
gcc/jit/docs/topics/contexts.rst
gcc/jit/jit-playback.c
gcc/jit/jit-recording.c
gcc/jit/jit-recording.h
gcc/jit/libgccjit++.h
gcc/jit/libgccjit.c
gcc/jit/libgccjit.h
gcc/jit/libgccjit.map
gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/add-driver-options-testlib.c [new file with mode: 0644]
gcc/testsuite/jit.dg/all-non-failing-tests.h
gcc/testsuite/jit.dg/jit.exp
gcc/testsuite/jit.dg/test-add-driver-options.c [new file with mode: 0644]