[ELF] accept thinlto options without --plugin-opt= prefix
authorBob Haarman <llvm@inglorion.net>
Wed, 25 Sep 2019 01:19:48 +0000 (01:19 +0000)
committerBob Haarman <llvm@inglorion.net>
Wed, 25 Sep 2019 01:19:48 +0000 (01:19 +0000)
commit9f0f36e02231e86eadaac12f74f6a86e1c5318c1
treebb8d9b7be07363eb0bc9359af4f5721443fade57
parent4cd71260c253d59e7347d8b3398eb31b88c4bffa
[ELF] accept thinlto options without --plugin-opt= prefix

Summary:
When support for ThinLTO was first added to lld, the options that
control it were prefixed with --plugin-opt= for compatibility with
an existing implementation as a linker plugin. This change enables
shorter versions of the options to be used, as follows:

  New                              Existing
  -thinlto-emit-imports-files      --plugin-opt=thinlto-emit-imports-files
  -thinlto-index-only              --plugin-opt=thinlto-index-only
  -thinlto-index-only=             --plugin-opt=thinlto-index-only=
  -thinlto-object-suffix-replace=  --plugin-opt=thinlto-object-suffix-replace=
  -thinlto-prefix-replace=         --plugin-opt=thinlto-prefix-replace=
  -lto-obj-path=                   --plugin-opt=obj-path=

The options with the --plugin-opt= prefix have been retained as aliases
for the shorter variants so that they continue to be accepted.

Reviewers: tejohnson, ruiu, espindola

Reviewed By: ruiu

Subscribers: emaste, arichardson, MaskRay, steven_wu, dexonsmith, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67782

llvm-svn: 372798
lld/ELF/Driver.cpp
lld/ELF/Options.td
lld/test/ELF/lto/thinlto-emit-imports.ll
lld/test/ELF/lto/thinlto-index-file.ll
lld/test/ELF/lto/thinlto-obj-path.ll
lld/test/ELF/lto/thinlto-object-suffix-replace.ll
lld/test/ELF/lto/thinlto-prefix-replace.ll