Author: Nico Weber Date: 2020-11-30T16:07:58-05:00 New Revision: 78c04fe99ec0013c53cd5d165543200009116c85
URL: https://github.com/llvm/llvm-project/commit/78c04fe99ec0013c53cd5d165543200009116c85 DIFF: https://github.com/llvm/llvm-project/commit/78c04fe99ec0013c53cd5d165543200009116c85.diff LOG: [lld/mac] Don't warn on -bundle and -execute flags They've been implemented since D87856 but since they still were HelpHidden, the driver still warned claiming they were implemented. Remove HelpHidden. Use -fatal_warnings to test that the flags now don't warn. The test depends on D91894 and D91891 to pass. Differential Revision: https://reviews.llvm.org/D91971 Added: Modified: lld/MachO/Options.td lld/test/MachO/load-commands.s Removed: ################################################################################ diff --git a/lld/MachO/Options.td b/lld/MachO/Options.td index ed3d00452bd3..de7cbf7faf3e 100644 --- a/lld/MachO/Options.td +++ b/lld/MachO/Options.td @@ -34,14 +34,12 @@ def grp_kind : OptionGroup<"kind">, HelpText<"OUTPUT KIND">; def execute : Flag<["-"], "execute">, HelpText<"Produce a main executable (default)">, - Flags<[HelpHidden]>, Group<grp_kind>; def dylib : Flag<["-"], "dylib">, HelpText<"Produce a shared library">, Group<grp_kind>; def bundle : Flag<["-"], "bundle">, HelpText<"Produce a bundle">, - Flags<[HelpHidden]>, Group<grp_kind>; def r : Flag<["-"], "r">, HelpText<"Merge multiple object files into one, retaining relocations">, diff --git a/lld/test/MachO/load-commands.s b/lld/test/MachO/load-commands.s index ec37d98408ef..abeefc4043e1 100644 --- a/lld/test/MachO/load-commands.s +++ b/lld/test/MachO/load-commands.s @@ -2,8 +2,9 @@ # RUN: rm -rf %t && mkdir -p %t # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o # RUN: %lld -o %t/executable %t/test.o -# RUN: %lld -bundle -o %t/bundle %t/test.o -# RUN: %lld -dylib -o %t/dylib %t/test.o +# RUN: %lld -fatal_warnings -execute -o %t/explicit-executable %t/test.o +# RUN: %lld -fatal_warnings -bundle -o %t/bundle %t/test.o +# RUN: %lld -fatal_warnings -dylib -o %t/dylib %t/test.o ## These load commands should be in every final output binary. # COMMON-DAG: cmd LC_DYLD_INFO_ONLY @@ -15,6 +16,8 @@ ## executable. Also check that it has the right filetype. # RUN: llvm-objdump --macho --all-headers %t/executable | FileCheck %s --check-prefix=COMMON # RUN: llvm-objdump --macho --all-headers %t/executable | FileCheck %s --check-prefix=EXEC +# RUN: llvm-objdump --macho --all-headers %t/explicit-executable | FileCheck %s --check-prefix=COMMON +# RUN: llvm-objdump --macho --all-headers %t/explicit-executable | FileCheck %s --check-prefix=EXEC # EXEC: magic cputype cpusubtype caps filetype # EXEC-NEXT: MH_MAGIC_64 X86_64 ALL {{.*}} EXECUTE # EXEC-DAG: cmd LC_MAIN _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits