[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 22 20:16:56 PDT 2024


================
@@ -179,6 +179,13 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args,
       Features.push_back("-hard-quad-float");
   }
 
+  if (Arg *A = Args.getLastArg(options::OPT_mv8plus, options::OPT_mno_v8plus)) {
+    if (A->getOption().matches(options::OPT_mv8plus))
----------------
koachan wrote:

It is off by default, but we also want it to override features enabled implicitly by `-mcpu` flags.
For example if I pass `-mcpu=v9 -mno-v8plus` then I want the compilation to be done with `v9` turned off.
So I think it is needed... unless there's other ways to do this?

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


More information about the cfe-commits mailing list