]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jit: clarify docs for gcc_jit_context_add_{command_line,driver}_option
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 18 May 2026 20:13:51 +0000 (16:13 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 18 May 2026 20:13:51 +0000 (16:13 -0400)
gcc/jit/ChangeLog:
* docs/topics/contexts.rst
(gcc_jit_context_add_command_line_option): Clarify that adding
multiple options requires multiple calls.
(gcc_jit_context_add_driver_option): Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/jit/docs/topics/contexts.rst

index 6792f7b042c45a2e64d2c65ed2d2f99eadab8bbd..7b17780667b1f862fc7e697c9dfcfe17c6f6e88f 100644 (file)
@@ -557,10 +557,13 @@ Additional command-line options
    by :func:`gcc_jit_context_compile` and
    :func:`gcc_jit_context_compile_to_file`.
 
+   If you need to add more than one such option, each should be done via
+   its own call to `gcc_jit_context_add_command_line_option`.
+
    The parameter ``optname`` must be non-NULL.  The underlying buffer is
    copied, so that it does not need to outlive the call.
 
-   Extra options added by `gcc_jit_context_add_command_line_option` are
+   Extra options added by calls to `gcc_jit_context_add_command_line_option` are
    applied *after* the regular options above, potentially overriding them.
    Options from parent contexts are inherited by child contexts; options
    from the parent are applied *before* those from the child.
@@ -593,7 +596,10 @@ Additional command-line options
    The parameter ``optname`` must be non-NULL.  The underlying buffer is
    copied, so that it does not need to outlive the call.
 
-   Extra options added by `gcc_jit_context_add_driver_option` are
+   If you need to add more than one such option, each should be done via
+   its own call to `gcc_jit_context_add_driver_option`.
+
+   Extra options added by calls to `gcc_jit_context_add_driver_option` are
    applied *after* all other options potentially overriding them.
    Options from parent contexts are inherited by child contexts; options
    from the parent are applied *before* those from the child.