llvm-project/lld/lib
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
..
Core Update for llvm api change. 2014-07-06 17:43:22 +00:00
Driver [mach-o]: support -syslibroot and -l options 2014-07-10 11:21:06 +00:00
Passes Move GOTPass and StubsPass from Core to MachO 2014-07-09 21:04:24 +00:00
ReaderWriter [mach-o]: support -syslibroot and -l options 2014-07-10 11:21:06 +00:00
CMakeLists.txt Add the core architecture for the lld driver. 2012-12-08 00:47:36 +00:00
Makefile Initial set of Makefiles 2014-06-04 09:54:07 +00:00