[llvm-commits] [PATCH] lld driver

Alex Rosenberg alexr at leftfield.org
Wed Dec 5 17:52:00 PST 2012



================
Comment at: tools/lld/lld.cpp:96
@@ +95,3 @@
+  // On mac treat ld as ld64.
+#ifdef __APPLE__
+  if (flavor == Driver::Flavor::ld)
----------------
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?

================
Comment at: include/lld/Driver/Driver.h:40
@@ +39,3 @@
+public:
+  enum class Flavor {
+    invalid,
----------------
Having an enum means adding another linker has to happen in a bunch of spots. Can this be done instead with a registry of templates of some kind?


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



More information about the llvm-commits mailing list