[clang] [RISCV] Allow YAML file to control multilib selection (PR #98856)

Sam Elliott via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 4 10:46:27 PDT 2024


================
@@ -258,6 +259,13 @@ static void getARMMultilibFlags(const Driver &D,
   }
 }
 
+static void getRISCVMultilibFlags(const Driver &D, const llvm::Triple &Triple,
+                                  const llvm::opt::ArgList &Args,
+                                  Multilib::flags_list &Result) {
+  Result.push_back("-march=" + riscv::getRISCVArch(Args, Triple));
----------------
lenary wrote:

the discourse thread also contains suggestions about splitting up each extension into a different flag - I'm not opposed to an approach like that either, and it might make creating a multilib config which matches the existing behaviour a lot easier.

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


More information about the cfe-commits mailing list