llvm-project/lld/lib/Driver
Tim Northover 77d82202d1 [mach-o]: support -syslibroot and -l options
These behave slightly idiosyncratically in the best of cases, and have
additional hacks layered on top of that for compatibility with badly behaved
build systems (via ld64).

For -lXYZ:
  + If XYZ is actually XY.o then search all library paths for XY.o
  + Otherwise search all library paths, first for libXYZ.dylib, then libXYZ.a
  + By default the library paths are /usr/lib and /usr/local/lib in that order.

For -syslibroot:
  + -syslibroot options apply to absolute paths in the search order.
  + All -syslibroot prefixes that exist are added to the search path *instead*
    of the original.
  + If no -syslibroot prefixed path exists, the original is kept.
  + Hacks^WExceptions:
      + If only 1 -syslibroot is given and doesn't contain /usr/lib or
        /usr/local/lib, that path is dropped entirely. (rdar://problem/6438270).
      + If the last -syslibroot is "/", all of them are ignored entirely.
        (rdar://problem/5829579).

At least, that's my best interpretation of what ld64 does in buildSearchPaths.

llvm-svn: 212706
2014-07-10 11:21:06 +00:00
..
CMakeLists.txt Sort. 2014-05-01 21:40:22 +00:00
CoreDriver.cpp Greatly simplify InputGraph. 2014-04-01 21:55:36 +00:00
CoreOptions.td This is my Driver refactoring patch. 2013-04-04 18:59:24 +00:00
DarwinLdDriver.cpp [mach-o]: support -syslibroot and -l options 2014-07-10 11:21:06 +00:00
DarwinLdOptions.td [mach-o]: support -syslibroot and -l options 2014-07-10 11:21:06 +00:00
Driver.cpp Don't import error_code into the lld namespace. 2014-06-12 14:53:47 +00:00
GnuLdDriver.cpp [all]: Use range-based ArgList adapter instead of filtered_begin/filtered_end 2014-07-09 13:03:54 +00:00
GnuLdInputGraph.cpp [Driver] Improve the `isPathUnderSysroot()` function. Now it returns a 2014-06-26 10:48:52 +00:00
GnuLdOptions.td [ELF] Accept "-rpath=<foo>" as well as "-rpath <foo>". 2014-04-06 21:23:24 +00:00
Makefile Initial set of Makefiles 2014-06-04 09:54:07 +00:00
TODO.rst [TODO] revisit features TODO in the driver 2014-04-02 05:45:52 +00:00
UniversalDriver.cpp Add missing includes. 2014-04-12 16:32:42 +00:00
UniversalDriverOptions.td [Driver] Change UniversalDriver to use TD file. 2013-10-24 04:23:02 +00:00
WinLinkDriver.cpp [all]: Use range-based ArgList adapter instead of filtered_begin/filtered_end 2014-07-09 13:03:54 +00:00
WinLinkInputGraph.cpp Don't import error_code into the lld namespace. 2014-06-12 14:53:47 +00:00
WinLinkModuleDef.cpp [PECOFF] DLL extension can be omitted in .def file. 2014-05-09 16:35:26 +00:00
WinLinkOptions.td [PECOFF] Add a test for lib.exe subcommand. 2014-05-01 00:06:56 +00:00