[all-commits] [llvm/llvm-project] 0e399e: [lld/mac] When handling @loader_path, use realpath...
Nico Weber via All-commits
all-commits at lists.llvm.org
Wed Jun 9 17:36:25 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0e399eb5273b13d37a70acaa7ad7291ee6273fb8
https://github.com/llvm/llvm-project/commit/0e399eb5273b13d37a70acaa7ad7291ee6273fb8
Author: Nico Weber <thakis at chromium.org>
Date: 2021-06-09 (Wed, 09 Jun 2021)
Changed paths:
M lld/MachO/InputFiles.cpp
A lld/test/MachO/link-search-at-loader-path-symlink.s
Log Message:
-----------
[lld/mac] When handling @loader_path, use realpath() of symlinks
This is important for Frameworks, which are usually symlinks.
ld64 gets this right for @rpath that's replaced with @loader_path, but not for
bare @loader_path -- ld64's code calls realpath() in that case too, but ignores
the result.
ld64 somehow manages to find libbar1.dylib in the test without the
explicit `-rpath` in Foo1. I don't understand why or how. But this
change is a step forward and fixes an immediate problem I'm having,
so let's start with this :)
Differential Revision: https://reviews.llvm.org/D103990
More information about the All-commits
mailing list