We have lots of -static-* options now. Add -static= (OPT_static_EQ) so
that people can specify -static=foo,bar instead of -static-foo and
-static-bar. This saves us a bunch of OPT_static_foo, OPT_static_bar,
etc, which may be added in the future.
Does this regress from existing behavior for unused argument warnings? Currently, -static-libstdc++ -nostdlib issues an unused argument warning for -static-libstdc++, while AFAICT -static=c++stdlib -nostdlib doesn't.
I'm not exactly sure how/where to issue this warning, though.
This change will suppress some unused argument warnings but I'll not call that "regression":)
Various toolchains already do things like:
Args.ClaimAllArgs(options::OPT_g_Group); Args.ClaimAllArgs(options::OPT_emit_llvm); Args.ClaimAllArgs(options::OPT_w);
Hexagon and Myriad even do Args.ClaimAllArgs(options::OPT_static_libgcc); This diagnostic IMO has very low value.
I accidentally come into this thread when searching for how to statically link to libc++/libc++abi. I'm really curious if this patch will or will not get merged. I'm really painful on using c++17 on ancient environment which does not have libc++/libc++ abi dynamic library. We have to remove -stdlib=libc++ and manually add libc++.a/libc++abi.a to the object lists. That's pretty hacky for cmake users. It'll be really awesome if we can have this patch merged. Thanks guys!