libcxx initial import

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/buildit b/lib/buildit
new file mode 100755
index 0000000..6cbe971
--- /dev/null
+++ b/lib/buildit
@@ -0,0 +1,42 @@
+if [ `basename $(pwd)` != "lib" ]
+then
+	echo "current directory must be lib"
+	exit 1
+fi
+
+if [ -z $CC ]
+then
+	CC=g++
+fi
+
+if [ -z $RC_BUILDIT ]
+then
+	RC_CFLAGS="-arch i386 -arch ppc -arch x86_64"
+fi
+
+if [ -z $RC_BUILDIT ]
+then
+    rm libc++.1.dylib
+fi
+
+set -x
+
+for FILE in $(ls ../src/*.cpp); do
+	$CC -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE
+done
+
+$CC -dynamiclib -nodefaultlibs $RC_CFLAGS -current_version 1 \
+        -compatibility_version 1 \
+        -o libc++.1.dylib *.o \
+        -install_name /usr/lib/libc++.dylib \
+        -Wl,-reexport_library,/usr/lib/libc++abi.dylib \
+        /usr/lib/libSystem.B.dylib
+
+#libtool -static -o libc++.a *.o
+
+set +x
+
+if [ -z $RC_BUILDIT ]
+then
+    rm *.o
+fi