[flang-commits] [clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)
Paul Osmialowski via flang-commits
flang-commits at lists.llvm.org
Sat Nov 30 11:47:15 PST 2024
================
@@ -1062,6 +1062,19 @@ bool Driver::readConfigFile(StringRef FileName,
for (Arg *A : *NewOptions)
A->claim();
+ // Filter out all -l and -Wl, options, put them into a separate list and erase
+ // from the original list of configuration file options. These will be used
+ // only when linking and appended after all of the command line options.
+ auto NewLinkerIns = std::make_unique<InputArgList>();
+ for (Arg *A : NewOptions->filtered(options::OPT_Wl_COMMA, options::OPT_l)) {
+ const Arg *BaseArg = &A->getBaseArg();
+ if (BaseArg == A)
+ BaseArg = nullptr;
----------------
pawosm-arm wrote:
rebased
https://github.com/llvm/llvm-project/pull/117573
More information about the flang-commits
mailing list