From 0dfbccb28999358c5769e3d7349321623ae74dd4 Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Fri, 16 Nov 2018 00:56:03 +0000
Subject: [PATCH] [libcxx, cmake] Make sure to find the abi lib that we
 just built for 10.6 or lower.

---
 libcxx/lib/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt
index e068edc8a7a..347f21ff45e 100644
--- a/libcxx/lib/CMakeLists.txt
+++ b/libcxx/lib/CMakeLists.txt
@@ -153,8 +153,8 @@ if (LIBCXX_OSX_REEXPORT_SYSTEM_ABI_LIBRARY)
     add_link_flags(
       "-compatibility_version 1"
       "-current_version 1"
-      "-install_name /usr/lib/libc++.1.dylib"
-      "-Wl,-reexport_library,/usr/lib/libc++abi.dylib"
+      "-install_name @rpath/libc++.1.dylib"
+      "-Wl,-reexport_library,${LIBCXX_LIBRARY_DIR}/libc++abi.dylib"
       "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
       "/usr/lib/libSystem.B.dylib")
   else()
