]> git.lizzy.rs Git - rust.git/commit
Use loader_path instead of executable_path for osx
authorAlex Crichton <alex@alexcrichton.com>
Tue, 5 Nov 2013 22:17:30 +0000 (14:17 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 5 Nov 2013 22:17:30 +0000 (14:17 -0800)
commit243c0dac8fe7e06125bad7b1f87a61794c8636f1
treea7368079fc2b8ad49bcb0dc3f65684fd8e669b8c
parent1c56652640c6f376cf454c63c7dd80eabe28ed5e
Use loader_path instead of executable_path for osx

According to apple's documentation of rpath semantics, @executable_path means
that the path is relative the the *process executable*, not necessarily the
library in question. On the other hand, @loader_path is the path that points to
the library which contains the @loader_path reference. All of our rpath usage is
based off the library or executable, not just the executable. This means that on
OSX we should be using @loader_path instead of @executable_path to achieve the
same semantics as linux's $ORIGIN.
src/librustc/back/rpath.rs