Mercurial > hg > CbC > CbC_gcc
comparison gcc/jit/docs/topics/contexts.rst @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 .. Copyright (C) 2014-2018 Free Software Foundation, Inc. | 1 .. Copyright (C) 2014-2020 Free Software Foundation, Inc. |
2 Originally contributed by David Malcolm <dmalcolm@redhat.com> | 2 Originally contributed by David Malcolm <dmalcolm@redhat.com> |
3 | 3 |
4 This is free software: you can redistribute it and/or modify it | 4 This is free software: you can redistribute it and/or modify it |
5 under the terms of the GNU General Public License as published by | 5 under the terms of the GNU General Public License as published by |
6 the Free Software Foundation, either version 3 of the License, or | 6 the Free Software Foundation, either version 3 of the License, or |
544 its presence using | 544 its presence using |
545 | 545 |
546 .. code-block:: c | 546 .. code-block:: c |
547 | 547 |
548 #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option | 548 #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option |
549 | |
550 .. function:: void gcc_jit_context_add_driver_option (gcc_jit_context *ctxt,\ | |
551 const char *optname) | |
552 | |
553 Add an arbitrary gcc driver option to the context, for use by | |
554 :func:`gcc_jit_context_compile` and | |
555 :func:`gcc_jit_context_compile_to_file`. | |
556 | |
557 The parameter ``optname`` must be non-NULL. The underlying buffer is | |
558 copied, so that it does not need to outlive the call. | |
559 | |
560 Extra options added by `gcc_jit_context_add_driver_option` are | |
561 applied *after* all other options potentially overriding them. | |
562 Options from parent contexts are inherited by child contexts; options | |
563 from the parent are applied *before* those from the child. | |
564 | |
565 For example: | |
566 | |
567 .. code-block:: c | |
568 | |
569 gcc_jit_context_add_driver_option (ctxt, "-lm"); | |
570 gcc_jit_context_add_driver_option (ctxt, "-fuse-linker-plugin"); | |
571 | |
572 Note that only some options are likely to be meaningful; there is no | |
573 "frontend" within libgccjit, so typically only those affecting | |
574 assembler and linker are likely to be useful. | |
575 | |
576 This entrypoint was added in :ref:`LIBGCCJIT_ABI_11`; you can test for | |
577 its presence using | |
578 | |
579 .. code-block:: c | |
580 | |
581 #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option |