aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorTarun Prabhu <tarun@lanl.gov>2024-10-14 08:44:24 -0600
committerGitHub <noreply@github.com>2024-10-14 08:44:24 -0600
commit839344f025fb7eff529735873f327330618b2ebb (patch)
tree5e369356b4b1e5d99b3a2c05adb6eca3c8a45794 /flang/lib/Frontend/CompilerInvocation.cpp
parentcbc4be2dd5b101aa362efc960541ded65a4c0ff7 (diff)
downloadllvm-839344f025fb7eff529735873f327330618b2ebb.zip
llvm-839344f025fb7eff529735873f327330618b2ebb.tar.gz
llvm-839344f025fb7eff529735873f327330618b2ebb.tar.bz2
[clang][flang][mlir] Reapply "Support -frecord-command-line option (#102975)"
The underlying issue was caused by a file included in two different places which resulted in duplicate definition errors when linking individual shared libraries. This was fixed in c3201ddaeac02a2c86a38b [#109874].
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 849c6f5..4607a33 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -349,6 +349,12 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
if (auto *a = args.getLastArg(clang::driver::options::OPT_save_temps_EQ))
opts.SaveTempsDir = a->getValue();
+ // -record-command-line option.
+ if (const llvm::opt::Arg *a =
+ args.getLastArg(clang::driver::options::OPT_record_command_line)) {
+ opts.RecordCommandLine = a->getValue();
+ }
+
// -mlink-builtin-bitcode
for (auto *a :
args.filtered(clang::driver::options::OPT_mlink_builtin_bitcode))