[PATCH] D48153: Add TARGET(foo) linker script directive.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 6 14:15:21 PDT 2018


ruiu added inline comments.


================
Comment at: lld/ELF/ScriptParser.cpp:486
+
+  if (Tok.startswith("elf"))
+    Config->FormatBinary = false;
----------------
MaskRay wrote:
> ruiu wrote:
> > rdhindsa wrote:
> > > Should "default" case be handled here as well?
> > I don't think so. We add features as-needed basis, so we don't add a lot of features ahead of time.
> You have separate commit to change `Driver.cpp:isOutputFormatBinary`. If we want to proceed with adding the `TARGET()` linker command, these lines should be better off unified with that function.
Unifying only these few lines code doesn't make much sense to me when I tried it, mainly because the code to share the code is as large as this code, and we need different error message for this.


https://reviews.llvm.org/D48153





More information about the llvm-commits mailing list