Index: lld/MachO/Options.td =================================================================== --- lld/MachO/Options.td +++ lld/MachO/Options.td @@ -30,14 +30,12 @@ def execute : Flag<["-"], "execute">, HelpText<"Produce a main executable (default)">, - Flags<[HelpHidden]>, Group; def dylib : Flag<["-"], "dylib">, HelpText<"Produce a shared library">, Group; def bundle : Flag<["-"], "bundle">, HelpText<"Produce a bundle">, - Flags<[HelpHidden]>, Group; def r : Flag<["-"], "r">, HelpText<"Merge multiple object files into one, retaining relocations">, Index: lld/test/MachO/load-commands.s =================================================================== --- lld/test/MachO/load-commands.s +++ 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