[flang] [clang] [flang] Add depdendent-lib option to flang -fc1 on Windows (PR #72121)

Andrzej WarzyƄski via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 14:39:48 PST 2023


================
@@ -1054,6 +1054,27 @@ static bool parseVScaleArgs(CompilerInvocation &invoc, llvm::opt::ArgList &args,
   return true;
 }
 
+static bool parseLinkerOptionsArgs(CompilerInvocation &invoc,
+                                   llvm::opt::ArgList &args,
+                                   clang::DiagnosticsEngine &diags) {
+  llvm::Triple triple = llvm::Triple(invoc.getTargetOpts().triple);
+
+  // TODO: support --dependent-lib on other platforms when MLIR supports
+  //       !llvm.dependent.lib
+  if (args.hasArg(clang::driver::options::OPT_dependent_lib) &&
+      !triple.isOSWindows()) {
+    const unsigned diagID =
+        diags.getCustomDiagID(clang::DiagnosticsEngine::Error,
+                              "--dependent-lib is only supported on Windows");
----------------
banach-space wrote:

Could you test for this diagnostic?

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


More information about the cfe-commits mailing list