[llvm-commits] [PATCH] lld driver

Sean Silva silvas at purdue.edu
Thu Dec 6 01:32:35 PST 2012



================
Comment at: tools/lld/lld.cpp:96
@@ +95,3 @@
+  // On mac treat ld as ld64.
+#ifdef __APPLE__
+  if (flavor == Driver::Flavor::ld)
----------------
Michael Spencer wrote:
> Alex Rosenberg wrote:
> > This presumes that the output is for Darwin. My use case is as a cross-compiler where ld does not mean ld64 and I'd really like to be able to use that on OS X.
> > 
> > Can we determine this instead based on the target OS?
> Ah, I see. I had assumed ld was always ld64 on mac.
> 
> I don't really like always assuming ld is ld64 when targeting mac either.
> 
> As most cross tools use prefixed naming (arm-linux-ld) I think that when invoked hosted on mac as just ld, it should always act as ld64. If it has any prefixes, it should act as ld.
> 
> Does anyone know of any cases with a prefixed ld that runs as ld64?
> 
> Other options are basing it purely on sys::getDefaultTarget, which is a configure time setting. Or just adding a config option specifically for this.
The most pragmatic thing to do here for now might be to just not add any magic special-casing, and wait for a bug report to come in. At that point in time it will probably be a lot clearer what the right thing to do is.


http://llvm-reviews.chandlerc.com/D169



More information about the llvm-commits mailing list