[PATCH] D70378: [LLD][COFF] Cover usage of LLD as a library

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 14:51:25 PDT 2020


aganea updated this revision to Diff 285762.
aganea retitled this revision from "[LLD][COFF] Fix missing cache cleanup in COFF::link()" to "[LLD][COFF] Cover usage of LLD as a library".
aganea edited the summary of this revision.
aganea added subscribers: int3, sbc100.
aganea added a comment.
Herald added subscribers: dexonsmith, steven_wu, aheejin, hiraditya, emaste.
Herald added a reviewer: espindola.

Add support for testing LLD as a library, by running the driver several times in a row when `LLD_IN_TEST` is defined. The value of `LLD_IN_TEST` tells how many times LLD should loop (3 times right now).

@amccarth As for your suggestion, I don't see an easy way right now to pass three different sets of command-line arguments to LLD. We could maybe think of a special syntax for that purpose, and/or use response files.

In the meanwhile, all COFF tests pass with this enabled (tested on Windows & Linux). The other drivers work, but some tests would need to fixed/improved, so I intentionnally enabled the feature only for the COFF driver.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70378

Files:
  lld/COFF/Driver.cpp
  lld/COFF/Writer.cpp
  lld/COFF/Writer.h
  lld/test/COFF/dll.test
  lld/test/COFF/duplicate-absolute-same.s
  lld/test/COFF/gc-dwarf.s
  lld/test/COFF/guardcf-lto.ll
  lld/test/COFF/icf-safe.s
  lld/test/COFF/lit.local.cfg
  lld/test/COFF/pdb-unknown-subsection.s
  lld/test/ELF/cgprofile-shared-warn.s
  lld/test/ELF/zdefs.s
  lld/tools/lld/lld.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70378.285762.patch
Type: text/x-patch
Size: 9144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200814/4e87b426/attachment.bin>


More information about the llvm-commits mailing list