[PATCH] [lld] [mach-o] Support -l and -syslibroot options
Tim Northover
t.p.northover at gmail.com
Mon Jul 7 10:15:31 PDT 2014
Hi,
The attached patch implements the -l and -syslibroot options for the
Darwin lld driver. They're in the same patch because testing -l (looks
in /usr/lib and /usr/local/lib) without being able to override the
prefix is rather problematic.
I think the implementation itself is reasonably straightforward (the
one wrinkle is iterating through all arguments now, as opposed to just
OPT_INPUT and OPT_l. Not *strictly* necessary yet, but adding more
filter OPT_nnn arguments to the iterator doesn't scale and we do have
a lot more to support in the end).
The most controversial part is likely to be the testing: it adds
crafted binary MachO inputs, which isn't ideal if they ever need
updating (unlikely, they simply export a single, given symbol). This
isn't exactly unique though, so hopefully won't cause any problems.
OK to commit?
Cheers.
Tim
(Added to Phabricator at Shankar's request)
http://reviews.llvm.org/D4409
Files:
include/lld/ReaderWriter/MachOLinkingContext.h
lib/Driver/DarwinLdDriver.cpp
lib/Driver/DarwinLdOptions.td
lib/ReaderWriter/MachO/MachOLinkingContext.cpp
test/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylib
test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a
test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o
test/mach-o/lib-search-paths.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4409.11121.patch
Type: text/x-patch
Size: 6594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140707/7e8716d1/attachment.bin>
More information about the llvm-commits
mailing list