================
@@ -6401,6 +6401,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
else if (UnwindTables)
CmdArgs.push_back("-funwind-tables=1");
+ // Forward the loadtime-comment vars option to cc1 only on targets that
+ // support it.
+ if (Arg *A = Args.getLastArg(options::OPT_mloadtime_comment_vars_EQ)) {
+ if (Triple.isOSAIX())
+ A->render(Args, CmdArgs);
----------------
tonykuttai wrote:
it was not intended. `cc1` marshalled the option as a string vector, so
repeated occurrence already append, but driver only forwarded the last one.
Corrected the driver behaviour to forward every occurrence of the option, so
both cc1 and driver combine the option lists. Tests added at both levels to
lock this behaviour. At driver level both occurrences reach cc1 in order and
during CodeGen: the cc1 option given twice preserves both variables. Docs
updated.
https://github.com/llvm/llvm-project/pull/187986
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits