[PATCH] D31208: Print out "suppoted targets" and "supported emulations".
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 17:45:23 PDT 2017
LGTM, this still seems verbose to me, but is a good compromise.
Thanks,
Rafael
Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
> ruiu updated this revision to Diff 92716.
> ruiu added a comment.
>
> - Do not print out "supported emulations".
>
>
> https://reviews.llvm.org/D31208
>
> Files:
> lld/ELF/DriverUtils.cpp
> lld/test/ELF/driver.test
>
>
> Index: lld/test/ELF/driver.test
> ===================================================================
> --- lld/test/ELF/driver.test
> +++ lld/test/ELF/driver.test
> @@ -15,6 +15,7 @@
>
> # RUN: ld.lld --help 2>&1 | FileCheck -check-prefix=HELP %s
> # HELP: USAGE:
> +# HELP: ld.lld: supported targets: {{.*}} elf
>
> # RUN: ld.lld --version 2>&1 | FileCheck -check-prefix=VERSION %s
> # VERSION: LLD
> Index: lld/ELF/DriverUtils.cpp
> ===================================================================
> --- lld/ELF/DriverUtils.cpp
> +++ lld/ELF/DriverUtils.cpp
> @@ -119,6 +119,18 @@
> void elf::printHelp(const char *Argv0) {
> ELFOptTable Table;
> Table.PrintHelp(outs(), Argv0, "lld", false);
> + outs() << "\n";
> +
> + // Scripts generated by Libtool 2.4.6 or earlier expects /supported
> + // targets:.* elf/ in a message for the -help option. If it doesn't
> + // match, the scripts suppose that the linker doesn't support very basic
> + // features such as shared libraries. Therefore, we need to print out at
> + // least "elf". Here, we print out all the targets that we support.
> + outs() << Argv0 << ": supported targets: "
> + << "elf32-i386 elf32-iamcu elf32-littlearm elf32-powerpc "
> + << "elf32-tradbigmips elf32-tradlittlemips elf32-x86-64 "
> + << "elf64-amdgpu elf64-littleaarch64 elf64-powerpc "
> + << "elf64-tradbigmips elf64-tradlittlemips elf64-x86-64\n";
> }
>
> // Reconstructs command line arguments so that so that you can re-run
>
>
> Index: lld/test/ELF/driver.test
> ===================================================================
> --- lld/test/ELF/driver.test
> +++ lld/test/ELF/driver.test
> @@ -15,6 +15,7 @@
>
> # RUN: ld.lld --help 2>&1 | FileCheck -check-prefix=HELP %s
> # HELP: USAGE:
> +# HELP: ld.lld: supported targets: {{.*}} elf
>
> # RUN: ld.lld --version 2>&1 | FileCheck -check-prefix=VERSION %s
> # VERSION: LLD
> Index: lld/ELF/DriverUtils.cpp
> ===================================================================
> --- lld/ELF/DriverUtils.cpp
> +++ lld/ELF/DriverUtils.cpp
> @@ -119,6 +119,18 @@
> void elf::printHelp(const char *Argv0) {
> ELFOptTable Table;
> Table.PrintHelp(outs(), Argv0, "lld", false);
> + outs() << "\n";
> +
> + // Scripts generated by Libtool 2.4.6 or earlier expects /supported
> + // targets:.* elf/ in a message for the -help option. If it doesn't
> + // match, the scripts suppose that the linker doesn't support very basic
> + // features such as shared libraries. Therefore, we need to print out at
> + // least "elf". Here, we print out all the targets that we support.
> + outs() << Argv0 << ": supported targets: "
> + << "elf32-i386 elf32-iamcu elf32-littlearm elf32-powerpc "
> + << "elf32-tradbigmips elf32-tradlittlemips elf32-x86-64 "
> + << "elf64-amdgpu elf64-littleaarch64 elf64-powerpc "
> + << "elf64-tradbigmips elf64-tradlittlemips elf64-x86-64\n";
> }
>
> // Reconstructs command line arguments so that so that you can re-run
More information about the llvm-commits
mailing list