From 831d861d8440ac7613dca6175485fc70941d1866 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 6 Oct 2011 16:26:32 -0700 Subject: [PATCH] Mac uses @executable_path instead of $ORIGIN --- src/comp/back/rpath.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comp/back/rpath.rs b/src/comp/back/rpath.rs index 781e42ef0e6a2..80ace14a4d09a 100644 --- a/src/comp/back/rpath.rs +++ b/src/comp/back/rpath.rs @@ -105,7 +105,7 @@ fn get_rpath_relative_to_output(os: session::os, // Mac doesn't appear to support $ORIGIN let prefix = alt os { session::os_linux. { "$ORIGIN" + fs::path_sep() } - session::os_macos. { "" } + session::os_macos. { "@executable_path" + fs::path_sep() } }; prefix + get_relative_to( @@ -322,7 +322,7 @@ mod test { fn test_rpath_relative() { let res = get_rpath_relative_to_output(session::os_macos, "/usr", "bin/rustc", "lib/libstd.so"); - assert res == "../lib"; + assert res == "@executable_path/../lib"; } #[test]