[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 14 20:48:49 PDT 2024
================
@@ -4045,6 +4045,24 @@ static bool RenderModulesOptions(Compilation &C, const Driver &D,
// module fragment.
CmdArgs.push_back("-fskip-odr-check-in-gmf");
+ if (Args.hasArg(options::OPT_modules_reduced_bmi) &&
+ (Input.getType() == driver::types::TY_CXXModule ||
+ Input.getType() == driver::types::TY_PP_CXXModule)) {
+ CmdArgs.push_back("-fexperimental-modules-reduced-bmi");
+
+ if (Args.hasArg(options::OPT_fmodule_output_EQ))
+ Args.AddLastArg(CmdArgs, options::OPT_fmodule_output_EQ);
+ else
+ CmdArgs.push_back(Args.MakeArgString(
+ "-fmodule-output=" +
+ getCXX20NamedModuleOutputPath(Args, Input.getBaseInput())));
----------------
ChuanqiXu9 wrote:
I am not sure. I tried to not concat it but the test gets failing. I didn't see why but I see almost we always concat it in such cases (appending a variable to some flag ends with `=`). So I feel it may not be problematic or we can fix such things together if we want.
https://github.com/llvm/llvm-project/pull/85050
More information about the cfe-commits
mailing list