diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp --- a/lld/MachO/Driver.cpp +++ b/lld/MachO/Driver.cpp @@ -1274,8 +1274,8 @@ #endif if (const Arg *arg = args.getLastArg(OPT_install_name)) { - if (config->outputType != MH_DYLIB) - warn(arg->getAsString(args) + ": ignored, only has effect with -dylib"); + if (config->outputType != MH_DYLIB && config->outputType != MH_BUNDLE) + warn(arg->getAsString(args) + ": ignored, only has effect with -dylib and -bundle"); else config->installName = arg->getValue(); } else if (config->outputType == MH_DYLIB) { diff --git a/lld/test/MachO/install-name.s b/lld/test/MachO/install-name.s --- a/lld/test/MachO/install-name.s +++ b/lld/test/MachO/install-name.s @@ -7,8 +7,7 @@ # RUN: llvm-objdump --macho --all-headers %t.exec \ # RUN: | FileCheck --check-prefix=NO-ID %s -# RUN: %no_fatal_warnings_lld -bundle -o %t.bundle %t.o -install_name foo 2>&1 \ -# RUN: | FileCheck --check-prefix=WARN %s +# RUN: %lld -bundle -o %t.bundle %t.o -install_name foo 2>&1 # RUN: llvm-objdump --macho --all-headers %t.bundle \ # RUN: | FileCheck --check-prefix=NO-ID %s