[PATCH] D75536: [LLD] Add support for --unique option

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 08:45:54 PST 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Config.h:197
   bool undefinedVersion;
+  bool unique = false;
   bool useAndroidRelrTags = false;
----------------
Delete `= false`


================
Comment at: lld/ELF/Driver.cpp:970
   config->sysroot = args.getLastArgValue(OPT_sysroot);
+  config->unique = args.hasArg(OPT_unique);
   config->target1Rel = args.hasFlag(OPT_target1_rel, OPT_target1_abs, false);
----------------
lexicographical order


================
Comment at: lld/test/ELF/unique-orphans.s:14
+## We should have 3 instances of orphan section foo.
+## Test with -r
+# RUN: ld.lld %t.o -r -o %t.ro --unique
----------------
The comment `## Test with -r` is redundant and should be deleted.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75536





More information about the llvm-commits mailing list