diff mbox series

[pushed] c++: rename -fmodules-ts to -fmodules

Message ID 20241111235628.54235-1-jason@redhat.com
State New
Headers show
Series [pushed] c++: rename -fmodules-ts to -fmodules | expand

Commit Message

Jason Merrill Nov. 11, 2024, 11:56 p.m. UTC
Tested x86_64-pc-linux-gnu, applying to trunk.

-- 8< --

The C++ modules support is not targeting the Modules TS, so it doesn't make
much sense to refer to the TS in the option name.  But keep the old spelling
as an undocumented alias for now.

gcc/ChangeLog:

	* doc/invoke.texi: Rename -fmodules-ts to -fmodules.

gcc/c-family/ChangeLog:

	* c.opt: Add -fmodules with same effect as -fmodules-ts.

gcc/cp/ChangeLog:

	* lang-specs.h: Check fmodules* instead of fmodules-ts.
---
 gcc/doc/invoke.texi | 24 ++++++++++++------------
 gcc/c-family/c.opt  | 10 +++++-----
 gcc/cp/lang-specs.h | 30 +++++++++++++++---------------
 3 files changed, 32 insertions(+), 32 deletions(-)


base-commit: e3de2962cbac3fc7f1d7c6d0205a62e68f3f4b3a
diff mbox series

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 93e9af3791c..6c2c64410d4 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -223,7 +223,7 @@  in the following sections.
 -fno-implicit-templates
 -fno-implicit-inline-templates
 -fno-implement-inlines
--fmodule-header@r{[}=@var{kind}@r{]} -fmodule-only -fmodules-ts
+-fmodule-header@r{[}=@var{kind}@r{]} -fmodule-only -fmodules
 -fmodule-implicit-inline
 -fno-module-lazy
 -fmodule-mapper=@var{specification}
@@ -3504,12 +3504,12 @@  To save space, do not emit out-of-line copies of inline functions
 controlled by @code{#pragma implementation}.  This causes linker
 errors if these functions are not inlined everywhere they are called.
 
-@opindex fmodules-ts
-@opindex fno-modules-ts
-@item -fmodules-ts
-@itemx -fno-modules-ts
+@opindex fmodules
+@opindex fno-modules
+@item -fmodules
+@itemx -fno-modules
 Enable support for C++20 modules (@pxref{C++ Modules}).  The
-@option{-fno-modules-ts} is usually not needed, as that is the
+@option{-fno-modules} is usually not needed, as that is the
 default.  Even though this is a C++20 feature, it is not currently
 implicitly enabled by selecting that standard version.
 
@@ -37926,7 +37926,7 @@  Acyclic Graph (DAG).  You must build imports before the importer.
 Header files may themselves be compiled to header units, which are a
 transitional ability aiming at faster compilation.  The
 @option{-fmodule-header} option is used to enable this, and implies
-the @option{-fmodules-ts} option.  These CMIs are named by the fully
+the @option{-fmodules} option.  These CMIs are named by the fully
 resolved underlying header file, and thus may be a complete pathname
 containing subdirectories.  If the header file is found at an absolute
 pathname, the CMI location is still relative to a CMI root directory.
@@ -37935,7 +37935,7 @@  As header files often have no suffix, you commonly have to specify a
 @option{-x} option to tell the compiler the source is a header file.
 You may use @option{-x c++-header}, @option{-x c++-user-header} or
 @option{-x c++-system-header}.  When used in conjunction with
-@option{-fmodules-ts}, these all imply an appropriate
+@option{-fmodules}, these all imply an appropriate
 @option{-fmodule-header} option.  The latter two variants use the
 user or system include path to search for the file specified.  This
 allows you to, for instance, compile standard library header files as
@@ -37953,8 +37953,8 @@  the bits/stdc++.h header used for libstdc++ precompiled headers you
 can
 
 @smallexample
-g++ -fmodules-ts -x c++-system-header -c bits/stdc++.h
-g++ -fmodules-ts -include bits/stdc++.h mycode.C
+g++ -fmodules -x c++-system-header -c bits/stdc++.h
+g++ -fmodules -include bits/stdc++.h mycode.C
 @end smallexample
 
 and any standard library #includes in mycode.C will be skipped,
@@ -38138,8 +38138,8 @@  output.  Usually you also want to use this option when explicitly
 preprocessing a header-unit, or consuming such preprocessed output:
 
 @smallexample
-g++ -fmodules-ts -E -fdirectives-only my-header.hh -o my-header.ii
-g++ -x c++-header -fmodules-ts -fpreprocessed -fdirectives-only my-header.ii
+g++ -fmodules -E -fdirectives-only my-header.hh -o my-header.ii
+g++ -x c++-header -fmodules -fpreprocessed -fdirectives-only my-header.ii
 @end smallexample
 
 @node C++ Compiled Module Interface
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 9b9f5e744f6..47d6f083ffe 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -2033,12 +2033,12 @@  flax-vector-conversions
 C ObjC C++ ObjC++ Var(flag_lax_vector_conversions)
 Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types.
 
-fmodules-ts
-C++ ObjC++ Var(flag_modules) Integer Init(0)
-Enable C++ modules-ts (experimental).
+fmodules
+C++ ObjC++ Var(flag_modules) Integer
+Enable C++20 Modules (experimental).
 
-fno-modules
-C++ ObjC++ Undocumented RejectNegative Var(flag_modules,0) Integer
+fmodules-ts
+C++ ObjC++ Alias(fmodules) Undocumented
 ;; undocumented
 
 fmodule-header
diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
index e5651567a2d..459832232dd 100644
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
@@ -46,62 +46,62 @@  along with GCC; see the file COPYING3.  If not see
   {".c++m", "@c++", 0, 0, 0},
   {".ccm", "@c++", 0, 0, 0},
   {"@c++-header",
-      "%{E|M|MM:cc1plus -E %{fmodules-ts:-fdirectives-only -fmodule-header}"
+      "%{E|M|MM:cc1plus -E %{fmodules*:-fdirectives-only -fmodule-header}"
       "  %(cpp_options) %2 %(cpp_debug_options)}"
       "%{!E:%{!M:%{!MM:"
       "  %{save-temps*|no-integrated-cpp:cc1plus -E"
-      "    %{fmodules-ts:-fdirectives-only -fmodule-header}"
+      "    %{fmodules*:-fdirectives-only -fmodule-header}"
       "	   %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}"
       "  cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed"
-      "            %{fmodules-ts:-fdirectives-only}"
+      "            %{fmodules*:-fdirectives-only}"
       " 	   %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
       "  %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
-      "  %{fmodules-ts:-fmodule-header %{fpreprocessed:-fdirectives-only}}"
+      "  %{fmodules*:-fmodule-header %{fpreprocessed:-fdirectives-only}}"
       "  %(cc1_options) %2"
       "  %{!fsyntax-only:"
       "    %{!S:-o %g.s}"
-      "    %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
+      "    %{!fmodule-*:%{!fmodules*:%{!fdump-ada-spec*:"
       "	         %{!o*:--output-pch %w%i.gch}%W{o*:--output-pch %w%*}}}}%{!S:%V}}"
       "}}}",
      CPLUSPLUS_CPP_SPEC, 0, 0},
   {"@c++-system-header",
       "%{E|M|MM:cc1plus -E"
-      "  %{fmodules-ts:-fdirectives-only -fmodule-header=system}"
+      "  %{fmodules*:-fdirectives-only -fmodule-header=system}"
       "  %(cpp_options) %2 %(cpp_debug_options)}"
       "%{!E:%{!M:%{!MM:"
       "  %{save-temps*|no-integrated-cpp:cc1plus -E"
-      "    %{fmodules-ts:-fdirectives-only -fmodule-header=system}"
+      "    %{fmodules*:-fdirectives-only -fmodule-header=system}"
       "	   %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}"
       "  cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed"
-      "            %{fmodules-ts:-fdirectives-only}"
+      "            %{fmodules*:-fdirectives-only}"
       " 	   %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
       "  %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
-      "  %{fmodules-ts:-fmodule-header=system"
+      "  %{fmodules*:-fmodule-header=system"
       "    %{fpreprocessed:-fdirectives-only}}"
       "  %(cc1_options) %2"
       "  %{!fsyntax-only:"
       "    %{!S:-o %g.s}"
-      "    %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
+      "    %{!fmodule-*:%{!fmodules*:%{!fdump-ada-spec*:"
       "	         %{!o*:--output-pch %w%i.gch}%W{o*:--output-pch %w%*}}}}%{!S:%V}}"
       "}}}",
      CPLUSPLUS_CPP_SPEC, 0, 0},
   {"@c++-user-header",
       "%{E|M|MM:cc1plus -E"
-      "  %{fmodules-ts:-fdirectives-only -fmodule-header=user}"
+      "  %{fmodules*:-fdirectives-only -fmodule-header=user}"
       "  %(cpp_options) %2 %(cpp_debug_options)}"
       "%{!E:%{!M:%{!MM:"
       "  %{save-temps*|no-integrated-cpp:cc1plus -E"
-      "    %{fmodules-ts:-fdirectives-only -fmodule-header=user}"
+      "    %{fmodules*:-fdirectives-only -fmodule-header=user}"
       "	   %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}"
       "  cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed"
-      "            %{fmodules-ts:-fdirectives-only}"
+      "            %{fmodules*:-fdirectives-only}"
       " 	   %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
       "  %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
-      "  %{fmodules-ts:-fmodule-header=user %{fpreprocessed:-fdirectives-only}}"
+      "  %{fmodules*:-fmodule-header=user %{fpreprocessed:-fdirectives-only}}"
       "  %(cc1_options) %2"
       "  %{!fsyntax-only:"
       "    %{!S:-o %g.s}"
-      "    %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
+      "    %{!fmodule-*:%{!fmodules*:%{!fdump-ada-spec*:"
       "	         %{!o*:--output-pch %w%i.gch}%W{o*:--output-pch %w%*}}}}%{!S:%V}}"
       "}}}",
      CPLUSPLUS_CPP_SPEC, 0, 0},