[PATCH] [lld] [mach-o] Support -l and -syslibroot options
Tim Northover
t.p.northover at gmail.com
Tue Jul 8 06:28:10 PDT 2014
> Ah, I see it applies to a basically randomly chosen set of paths. That
> we'll almost certainly have to emulate. What fun! I'm rapidly
> developing an abiding horror for linkers.
That actual algorithm seems to be closer to:
1. Add -L options to the search path (if it exists and is a directory).
2. Record -syslibroot paths for later.
3. Unless the last one is "/". Then discard the lot, because logic is for wimps.
4. Try the cartesian product of syslibroots and *absolute* library
paths. Add ones that exist to the search path.
5. If not, add the original unless there's just one syslibroot and
it's a default path. Then skip it.
6. Do all the above in a particular order.
I'll fix the patch to do something similar, if I don't lose the will
to live first.
Cheers.
Tim.
More information about the llvm-commits
mailing list