[build] Create the link for the final library install name in the lib dir.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 6 Feb 2013 00:04:54 +0000 (00:04 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 6 Feb 2013 00:04:54 +0000 (00:04 +0000)
 - Otherwise, we never were actually linking against the right library when
   building the test applications.

llvm-svn: 174470

libcxx/lib/buildit

index 0b1f6e5..f8e3178 100755 (executable)
@@ -119,6 +119,21 @@ $CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
 
 #libtool -static -o libc++.a *.o
 
+# Create the link for the final library name, so that we can use this directory
+# as a link target for the tests.
+case $TRIPLE in
+    *-apple-*)
+        rm -f libc++.dylib
+        ln -s libc++.1.dylib libc++.dylib
+        ;;
+    *-*-mingw*)
+        ;;
+    *)
+        rm -f libc++.so
+        ln -s libc++.so.1 libc++.so
+        ;;
+esac
+
 if [ -z $RC_XBS ]
 then
     rm *.o