Joe added a comment.


> Thanks for explaining. I found that when I was writing a regex to match flags 
> it was helpful to have a part of the string I could be sure would be there to 
> avoid matching the wrong type of flag, and `march=` helped with that. I also 
> worry that names from different types of flags could clash without some kind 
> of namespacing.

Understandable about the flag names clashing. The scope of riscv multilibs was 
just arch/abi, so there was no concern about clashing/matching the wrong type 
of flag. Would it be weird for one target to have the `march=` but anothers not?



================
Comment at: clang/lib/Driver/Driver.cpp:2213
+  if (C.getArgs().hasArg(options::OPT_print_multi_selection_flags)) {
+    for (StringRef Attr : TC.getMultiSelectionFlags(C.getArgs()))
+      llvm::outs() << Attr << '\n';
----------------
Do we want to parse the multilib.yaml here so we can print out custom flags as 
well? It could help diagnose issues people have with them.


================
Comment at: clang/lib/Driver/ToolChain.cpp:204
+    Result.push_back(
+        clang::driver::getDriverOptTable().getOptionName(Option).str());
+  }
----------------
> 
>> the form `x=y` is already broken when you add the flags from the flag list.
> 
> Can you give an example of what you mean by that? Sounds like something that 
> might need fixing.
For example the option name for OPT_fexceptions is just `fexceptions`, and this 
is added directly to `Results`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142933/new/

https://reviews.llvm.org/D142933

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to