[PATCH] D61040: [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 22:36:14 PDT 2019

phosek added inline comments.

Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:122
+/// \p Flag must be a flag accepted by the driver with its leading '-' removed,
+//     otherwise '-print-multi-lib' will not emit them correctly.
jroelofs wrote:
> Can we enforce this precondition with an assert? The '-'-prefix-not-there part is easy, but what about the "it's a driver flag" part?
We could, but we would need to pass in the reference to `Driver` so we can use `getOpts().ParseOneArg` to parse the flag. However, we're not doing that in `Multilib` either at the moment even though [the comment says it has to be a valid flag](https://github.com/llvm/llvm-project/blob/master/clang/include/clang/Driver/Multilib.h#L80). I'd prefer to keep this as a pure move and then add the additional checking both here and to `Multilib` as a separate change, would that be fine with you?

  rC Clang



More information about the cfe-commits mailing list