[flang-commits] [clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

Alexis Perry-Holby via flang-commits flang-commits at lists.llvm.org
Tue Jun 11 08:17:06 PDT 2024


================
@@ -411,6 +412,13 @@ void Flang::addTargetOptions(const ArgList &Args,
   }
 
   // TODO: Add target specific flags, ABI, mtune option etc.
+  if (const Arg *A = Args.getLastArg(options::OPT_mtune_EQ)) {
+    CmdArgs.push_back("-tune-cpu");
+    if (strcmp(A->getValue(), "native") == 0)
----------------
AlexisPerry wrote:

I see your point, however when I build the code using normal `==` comparison I get a warning:
`warning: comparison with string literal results in unspecified behavior`
and I am inclined to avoid such possible unspecified behavior.

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


More information about the flang-commits mailing list