[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 30 10:47:00 PST 2024


================
@@ -1073,6 +1086,19 @@ bool Driver::readConfigFile(StringRef FileName,
       appendOneArg(*CfgOptions, Opt, BaseArg);
     }
   }
+
+  if (!CfgLinkerInputs)
+    CfgLinkerInputs = std::move(NewLinkerIns);
+  else {
+    // If this is a subsequent config file, append options to the previous one.
+    for (auto *Opt : *NewLinkerIns) {
+      const Arg *BaseArg = &Opt->getBaseArg();
----------------
MaskRay wrote:

Remove `getBaseArg`

https://github.com/llvm/llvm-project/pull/117573


More information about the cfe-commits mailing list