[PATCH] D47994: [Darwin] Do not error on '-lto_library' option
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 12:33:34 PDT 2018
pcc added a comment.
ELF linkers support a similar flag, `-plugin`, for passing the path to an LTO plugin. At least on Linux we can't always tell whether the linker is lld so we just pass `-plugin` all the time, and then in the linker we ignore it. We can do the same for `-lto_library`.
Right now we just want to error out if someone actually tries to do LTO by passing a bitcode fiel to the linker. I imagine that Mach-O lld is already erroring out if it sees a bitcode file, so probably all that needs to happen here is to add the flag to `lib/Driver/DarwinLdOptions.td`. You probably don't want to print a warning because you don't want to see this warning on ~every link.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D47994
More information about the llvm-commits
mailing list