aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/libgccjit.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-06-30 19:27:19 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-06-30 19:27:19 +0000
commitfa22c20d5ae9df54a5f96f4f72db72a2c4c8e2c7 (patch)
tree216dcfe8525aa7d749c5a1c65ca69a8493f4dfac /gcc/jit/libgccjit.c
parenta6314e15e0c5671e71f4511011a125aab3cc3d6a (diff)
downloadgcc-fa22c20d5ae9df54a5f96f4f72db72a2c4c8e2c7.zip
gcc-fa22c20d5ae9df54a5f96f4f72db72a2c4c8e2c7.tar.gz
gcc-fa22c20d5ae9df54a5f96f4f72db72a2c4c8e2c7.tar.bz2
PR jit/66628: add gcc_jit_context_add_command_line_option
gcc/jit/ChangeLog: PR jit/66628 * docs/cp/topics/contexts.rst (Additional command-line options): New section. * docs/topics/compatibility.rst: New file. * docs/topics/contexts.rst (Additional command-line options): New section. * docs/topics/index.rst: Add compatibility.rst. * docs/_build/texinfo/libgccjit.texi: Regenerate. * jit-playback.c (make_fake_args): Add call to append_command_line_options. * jit-recording.c: Within namespace gcc::jit... (recording::context::~context): Free the optnames within m_command_line_options. (recording::context::set_bool_option): Likewise. (recording::context::add_command_line_option): New method. (recording::context::append_command_line_options): New method. (recording::context::dump_reproducer_to_file): Add command-line options. * jit-recording.h: Within namespace gcc::jit... (recording::context::add_command_line_option): New method. (recording::context::append_command_line_options): New method. (recording::context::m_command_line_options): New field. * libgccjit++.h (gccjit::context::add_command_line_option): New method. * libgccjit.c (gcc_jit_context_add_command_line_option): New API entrypoint. * libgccjit.h (gcc_jit_context_add_command_line_option): New API entrypoint. (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New macro. * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option. gcc/testsuite/ChangeLog: PR jit/66628 * jit.dg/all-non-failing-tests.h: Add note about test-extra-options.c. * jit.dg/test-extra-options.c: New testcase. From-SVN: r225205
Diffstat (limited to 'gcc/jit/libgccjit.c')
-rw-r--r--gcc/jit/libgccjit.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
index dedf942..44791ab 100644
--- a/gcc/jit/libgccjit.c
+++ b/gcc/jit/libgccjit.c
@@ -2185,6 +2185,25 @@ gcc_jit_context_set_bool_option (gcc_jit_context *ctxt,
/* Public entrypoint. See description in libgccjit.h.
After error-checking, the real work is done by the
+ gcc::jit::recording::context::add_command_line_option method in
+ jit-recording.c. */
+
+void
+gcc_jit_context_add_command_line_option (gcc_jit_context *ctxt,
+ const char *optname)
+{
+ RETURN_IF_FAIL (ctxt, NULL, NULL, "NULL context");
+ JIT_LOG_FUNC (ctxt->get_logger ());
+ RETURN_IF_FAIL (optname, ctxt, NULL, "NULL optname");
+ if (ctxt->get_logger ())
+ ctxt->get_logger ()->log ("optname: %s", optname);
+
+ ctxt->add_command_line_option (optname);
+}
+
+/* Public entrypoint. See description in libgccjit.h.
+
+ After error-checking, the real work is done by the
gcc::jit::recording::context::enable_dump method in
jit-recording.c. */