egorzhdan created this revision. Herald added a subscriber: dang. Herald added a project: All. egorzhdan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
This is a follow-up for https://reviews.llvm.org/D120160 that addresses some of the post-merge feedback. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D121141 Files: clang/docs/ClangCommandLineReference.rst clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChain.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/unstable-flag.cpp Index: clang/test/Driver/unstable-flag.cpp =================================================================== --- clang/test/Driver/unstable-flag.cpp +++ clang/test/Driver/unstable-flag.cpp @@ -1,5 +1,4 @@ // RUN: %clang -funstable -### %s 2>&1 | FileCheck %s // CHECK: -funstable -// CHECK: -fcoroutines-ts // CHECK: -fmodules-ts Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -5766,8 +5766,6 @@ if (Args.hasArg(options::OPT_funstable)) { CmdArgs.push_back("-funstable"); - if (!Args.hasArg(options::OPT_fno_coroutines_ts)) - CmdArgs.push_back("-fcoroutines-ts"); CmdArgs.push_back("-fmodules-ts"); } Index: clang/lib/Driver/ToolChain.cpp =================================================================== --- clang/lib/Driver/ToolChain.cpp +++ clang/lib/Driver/ToolChain.cpp @@ -966,6 +966,8 @@ switch (Type) { case ToolChain::CST_Libcxx: CmdArgs.push_back("-lc++"); + if (Args.hasArg(options::OPT_funstable)) + CmdArgs.push_back("-lc++experimental"); break; case ToolChain::CST_Libstdcxx: Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -1162,7 +1162,10 @@ defm unstable : BoolFOption<"unstable", LangOpts<"Unstable">, DefaultFalse, - PosFlag<SetTrue, [CC1Option, CoreOption], "Enable unstable and experimental features">, + PosFlag<SetTrue, [CC1Option, CoreOption], "Enable unstable and experimental language and library features. " + "This option enables various language and library features that are either experimental (also known as TSes)," + " or have been standardized but are not stable yet. This option should not be used in production code, since " + "neither ABI nor API stability are guaranteed">, NegFlag<SetFalse>>; def fembed_offload_object_EQ : Joined<["-"], "fembed-offload-object=">, Index: clang/docs/ClangCommandLineReference.rst =================================================================== --- clang/docs/ClangCommandLineReference.rst +++ clang/docs/ClangCommandLineReference.rst @@ -271,6 +271,12 @@ Build this module as a system module. Only used with -emit-module +.. option:: -funstable + +Enable unstable and experimental language and library features. + +This option enables various language and library features that are either experimental (also known as TSes), or have been standardized but are not stable yet. This option should not be used in production code, since neither ABI nor API stability are guaranteed. + .. option:: -fuse-cuid=<arg> Method to generate ID's for compilation units for single source offloading languages CUDA and HIP: 'hash' (ID's generated by hashing file path and command line options) \| 'random' (ID's generated as random numbers) \| 'none' (disabled). Default is 'hash'. This option will be overridden by option '-cuid=\[ID\]' if it is specified.
Index: clang/test/Driver/unstable-flag.cpp =================================================================== --- clang/test/Driver/unstable-flag.cpp +++ clang/test/Driver/unstable-flag.cpp @@ -1,5 +1,4 @@ // RUN: %clang -funstable -### %s 2>&1 | FileCheck %s // CHECK: -funstable -// CHECK: -fcoroutines-ts // CHECK: -fmodules-ts Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -5766,8 +5766,6 @@ if (Args.hasArg(options::OPT_funstable)) { CmdArgs.push_back("-funstable"); - if (!Args.hasArg(options::OPT_fno_coroutines_ts)) - CmdArgs.push_back("-fcoroutines-ts"); CmdArgs.push_back("-fmodules-ts"); } Index: clang/lib/Driver/ToolChain.cpp =================================================================== --- clang/lib/Driver/ToolChain.cpp +++ clang/lib/Driver/ToolChain.cpp @@ -966,6 +966,8 @@ switch (Type) { case ToolChain::CST_Libcxx: CmdArgs.push_back("-lc++"); + if (Args.hasArg(options::OPT_funstable)) + CmdArgs.push_back("-lc++experimental"); break; case ToolChain::CST_Libstdcxx: Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -1162,7 +1162,10 @@ defm unstable : BoolFOption<"unstable", LangOpts<"Unstable">, DefaultFalse, - PosFlag<SetTrue, [CC1Option, CoreOption], "Enable unstable and experimental features">, + PosFlag<SetTrue, [CC1Option, CoreOption], "Enable unstable and experimental language and library features. " + "This option enables various language and library features that are either experimental (also known as TSes)," + " or have been standardized but are not stable yet. This option should not be used in production code, since " + "neither ABI nor API stability are guaranteed">, NegFlag<SetFalse>>; def fembed_offload_object_EQ : Joined<["-"], "fembed-offload-object=">, Index: clang/docs/ClangCommandLineReference.rst =================================================================== --- clang/docs/ClangCommandLineReference.rst +++ clang/docs/ClangCommandLineReference.rst @@ -271,6 +271,12 @@ Build this module as a system module. Only used with -emit-module +.. option:: -funstable + +Enable unstable and experimental language and library features. + +This option enables various language and library features that are either experimental (also known as TSes), or have been standardized but are not stable yet. This option should not be used in production code, since neither ABI nor API stability are guaranteed. + .. option:: -fuse-cuid=<arg> Method to generate ID's for compilation units for single source offloading languages CUDA and HIP: 'hash' (ID's generated by hashing file path and command line options) \| 'random' (ID's generated as random numbers) \| 'none' (disabled). Default is 'hash'. This option will be overridden by option '-cuid=\[ID\]' if it is specified.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits