[flang-commits] [flang] [flang][driver] Make the -J option less restrictive so we would not have to struggle with autoconf (PR #110010)
Paul Osmialowski via flang-commits
flang-commits at lists.llvm.org
Thu Sep 26 12:42:18 PDT 2024
================
@@ -832,12 +833,15 @@ static bool parseSemaArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
// -J/module-dir option
auto moduleDirList =
args.getAllArgValues(clang::driver::options::OPT_module_dir);
- // User can only specify -J/-module-dir once
+ // User can only specify one -J/-module-dir directory
// https://gcc.gnu.org/onlinedocs/gfortran/Directory-Options.html
+ std::sort(moduleDirList.begin(), moduleDirList.end());
+ moduleDirList.erase(std::unique(moduleDirList.begin(), moduleDirList.end()),
+ moduleDirList.end());
if (moduleDirList.size() > 1) {
const unsigned diagID =
diags.getCustomDiagID(clang::DiagnosticsEngine::Error,
- "Only one '-module-dir/-J' option allowed");
+ "Only one '-module-dir/-J' directory allowed");
----------------
pawosm-arm wrote:
Changed according to your suggestion, thanks.
https://github.com/llvm/llvm-project/pull/110010
More information about the flang-commits
mailing list