aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-02-19 09:18:13 -0800
committerNathan Sidwell <nathan@acm.org>2021-02-19 09:40:12 -0800
commitbfe83ae38e871a2e4205ce63fd9d3247dff412bd (patch)
tree8e723cf7a4017d46a7aa27d45cbb77972e7188e8 /gcc/doc
parentf86e187e12db14ad1cced26b9f8aafb06498e208 (diff)
downloadgcc-bfe83ae38e871a2e4205ce63fd9d3247dff412bd.zip
gcc-bfe83ae38e871a2e4205ce63fd9d3247dff412bd.tar.gz
gcc-bfe83ae38e871a2e4205ce63fd9d3247dff412bd.tar.bz2
c++: Inform of CMI reads [PR 99166]
When successfully reading a module CMI, the user gets no indication of where that CMI was located. I originally didn't consider this a problem -- the read was successful after all. But it can make it difficult to interact with build systems, particularly when caching can be involved. Grovelling over internal dump files is not really useful to the user. Hence this option, which is similar to the -flang-info-include-translate variants, and allows the user to ask for all, or specific module read notification. gcc/c-family/ * c.opt (flang-info-module-read, flang-info-module-read=): New. gcc/ * doc/invoke.texi (flang-info-module-read): Document. gcc/cp/ * module.cc (note_cmis): New. (struct module_state): Add inform_read_p bit. (module_state::do_import): Inform of CMI location, if enabled. (init_modules): Canonicalize note_cmis entries. (handle_module_option): Handle -flang-info-module-read=FOO. gcc/testsuite/ * g++.dg/modules/pr99166_a.X: New. * g++.dg/modules/pr99166_b.C: New. * g++.dg/modules/pr99166_c.C: New. * g++.dg/modules/pr99166_d.C: New.
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi22
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c00514a..ea315f1 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -240,8 +240,9 @@ in the following sections.
-fvisibility-inlines-hidden @gol
-fvisibility-ms-compat @gol
-fext-numeric-literals @gol
--flang-info-include-translate@r{[}=@var{name}@r{]} @gol
+-flang-info-include-translate@r{[}=@var{header}@r{]} @gol
-flang-info-include-translate-not @gol
+-flang-info-module-read@r{[}=@var{module}@r{]} @gol
-stdlib=@var{libstdc++,libc++} @gol
-Wabi-tag -Wcatch-value -Wcatch-value=@var{n} @gol
-Wno-class-conversion -Wclass-memaccess @gol
@@ -3382,13 +3383,22 @@ is used when building the C++ library.)
@itemx -flang-info-include-translate=@var{header}
@opindex flang-info-include-translate
@opindex flang-info-include-translate-not
-Diagnose include translation events. The first will note accepted
+Inform of include translation events. The first will note accepted
include translations, the second will note declined include
translations. The @var{header} form will inform of include
translations relating to that specific header. If @var{header} is of
the form @code{"user"} or @code{<system>} it will be resolved to a
specific user or system header using the include path.
+@item -flang-info-module-read
+@itemx -flang-info-module-read=@var{module}
+@opindex flang-info-module-read
+Inform of Compiled Module Interface pathnames. The first will note
+all read CMI pathnames. The @var{module} form will not reading a
+specific module's CMI. @var{module} may be a named module or a
+header-unit (the latter indicated by either being a pathname containing
+directory separators or enclosed in @code{<>} or @code{""}).
+
@item -stdlib=@var{libstdc++,libc++}
@opindex stdlib
When G++ is configured to support this option, it allows specification of
@@ -33050,9 +33060,15 @@ textual. With an argument, queries about include translation of a
header files with that particular trailing pathname are noted. You
may repeat this form to cover several different header files. This
option may be helpful in determining whether include translation is
-happening---if it is working correctly, it'll behave as if it wasn't
+happening---if it is working correctly, it behaves as if it isn't
there at all.
+The @option{-flang-info-module-read} option can be used to determine
+where the compiler is reading a CMI from. Without the option, the
+compiler is silent when such a read is successful. This option has an
+optional argument, which will restrict the notification to just the
+set of named modules or header units specified.
+
The @option{-Winvalid-imported-macros} option causes all imported macros
to be resolved at the end of compilation. Without this, imported
macros are only resolved when expanded or (re)defined. This option