[PATCH] D78328: [lld] Infer the driver mode from the target.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 14:31:40 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/tools/lld/lld.cpp:134
+  // Deduce the flavor from the target.
+  if (targetMatches(v, [](StringRef s) {
+        return s.contains("linux") || s.contains("elf");
----------------
This checks `-m` for lld-link, wasm-ld and ld64 which not be great.

We can place the check inside:
```
#if __APPLE__
  // Use Darwin driver for "ld" on Darwin.
  if (progname == "ld")
    return Darwin;
#endif
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78328/new/

https://reviews.llvm.org/D78328





More information about the llvm-commits mailing list