[PATCH] D89004: [LLD] [COFF] Implement a GNU/ELF like -wrap option

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 22:54:34 PDT 2020


mstorsjo added inline comments.


================
Comment at: lld/COFF/Driver.cpp:2012
 
+  // Create wrapped symbols for --wrap option.
+  std::vector<WrappedSymbol> wrapped = addWrappedSymbols(args);
----------------
orgads wrote:
> -wrap?
Oh, right, yes, within lld-link, that's the only correct spelling of it.


================
Comment at: lld/test/MinGW/driver.test:285
+
+RUN: ld.lld -### -m i386pep foo.o -wrap foo1 --wrap foo2 | FileCheck -check-prefix WRAP %s
+RUN: ld.lld -### -m i386pep foo.o -wrap=foo1 --wrap=foo2 | FileCheck -check-prefix WRAP %s
----------------
orgads wrote:
> -wrap foo2?
No, GNU ld supports the option with one or two leading dashes, so this intentionally tests both (and either with the parameter as a separate argument, or with concatenated with an equals char). The option on the lld-link level on the other hand, has only one spelling.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89004



More information about the llvm-commits mailing list