https://gcc.gnu.org/g:85a58be7b6bb6bde1de6321d0b4934f142959d7b

commit r17-572-g85a58be7b6bb6bde1de6321d0b4934f142959d7b
Author: David Malcolm <[email protected]>
Date:   Mon May 18 16:13:51 2026 -0400

    jit: clarify docs for gcc_jit_context_add_{command_line,driver}_option
    
    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 <[email protected]>

Diff:
---
 gcc/jit/docs/topics/contexts.rst | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gcc/jit/docs/topics/contexts.rst b/gcc/jit/docs/topics/contexts.rst
index 6792f7b042c4..7b17780667b1 100644
--- a/gcc/jit/docs/topics/contexts.rst
+++ b/gcc/jit/docs/topics/contexts.rst
@@ -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.

Reply via email to