diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -646,6 +646,8 @@ def: J<"plugin-opt=sample-profile=">, Alias, HelpText<"Alias for --lto-sample-profile">; def: F<"plugin-opt=save-temps">, Alias, HelpText<"Alias for --save-temps">; +def: J<"plugin-opt=stats-file=">, + Alias, HelpText<"Alias for --stats-file=">; def: F<"plugin-opt=thinlto-emit-imports-files">, Alias, HelpText<"Alias for --thinlto-emit-imports-files">; diff --git a/lld/test/ELF/lto/stats-file-option.ll b/lld/test/ELF/lto/stats-file-option.ll --- a/lld/test/ELF/lto/stats-file-option.ll +++ b/lld/test/ELF/lto/stats-file-option.ll @@ -6,6 +6,10 @@ ; RUN: ld.lld --stats-file=%t2.stats -m elf_x86_64 -r -o %t.o %t.bc ; RUN: FileCheck --input-file=%t2.stats %s +;; Also test the --plugin-opt version of this flag. +; RUN: ld.lld --plugin-opt=stats-file=%t2.stats -m elf_x86_64 -r -o %t.o %t.bc +; RUN: FileCheck --input-file=%t2.stats %s + ; CHECK: { ; CHECK: "asm-printer.EmittedInsts": ; CHECK: "inline.NumInlined":