[PATCH] clang-cl: Support the /link option and hard-code the target triple
Hans Wennborg
hans at chromium.org
Tue Aug 13 16:45:39 PDT 2013
================
Comment at: lib/Driver/Driver.cpp:339
@@ -338,1 +338,3 @@
+ if (IsCLMode())
+ DefaultTargetTriple = "i686-pc-win32";
if (const Arg *A = Args->getLastArg(options::OPT_target))
----------------
Reid Kleckner wrote:
> This should take the existing default target triple and just override the OS and vendor. The ISA should probably match however clang-cl was built. The LLVM Triple class should make it easy to do that and round trip it back to a string, since that's what we have here currently. Or for extra bonus points you can make DefaultTargetTriple an actual Triple.
Done. (I kept DefaultTargetTriple as a string, adding converting it to the list of potential cleanups.)
================
Comment at: lib/Driver/Tools.cpp:6596
@@ -6595,2 +6595,3 @@
Args.AddAllArgValues(CmdArgs, options::OPT_l);
+ Args.AddAllArgValues(CmdArgs, options::OPT__SLASH_link);
----------------
Reid Kleckner wrote:
> Can you make sure we forward -Wl, in non-cl mode, or just add a FIXME? I seem to recall problems with it the other day.
Yes, it seems we don't forward -Wl et al. I've added a FIXME.
http://llvm-reviews.chandlerc.com/D1388
COMMIT
http://llvm-reviews.chandlerc.com/rL188331
More information about the cfe-commits
mailing list