[PATCH] D47542: Implement --{push,pop}-state.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 10:01:25 PDT 2018


ruiu created this revision.
ruiu added a reviewer: grimar.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: espindola.

--push-state implemented in this patch saves the states of --as-needed,
--whole-archive and --static. It saves less number of flags than GNU linkers.
Since even GNU linkers save different flags, no one seems to care about the
details. In this patch, I tried to save the minimal number of flags to not
complicate the implementation and the siutation.

I'm not personally happy to add the --{push,pop}-state flags though.
That options seem too hacky to me. However, gcc started using the options
since GCC 8 when GNU ld is available at the build time. Thererfore, lld
is no longer a drop-in replacmenet for GNU linker for that machine
without supporting the flags.


https://reviews.llvm.org/D47542

Files:
  lld/ELF/Driver.cpp
  lld/ELF/Options.td
  lld/docs/ld.lld.1
  lld/test/ELF/push-state.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47542.149150.patch
Type: text/x-patch
Size: 3519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180530/691ca97f/attachment.bin>


More information about the llvm-commits mailing list