From 9c3636a67631cc5a37131fc939fee82ca46a7d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 24 Jan 2018 12:24:06 +0200 Subject: [PATCH] Check out the right versions of libunwind/libcxxabi/libcxx before building at all This makes sure that libunwind and libcxxabi actually get built against the same headers that are checked out later. --- build-libcxx.sh | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/build-libcxx.sh b/build-libcxx.sh index 9784d0c..b9b53d4 100755 --- a/build-libcxx.sh +++ b/build-libcxx.sh @@ -24,15 +24,29 @@ if [ ! -d libcxx ]; then git clone -b master https://github.com/llvm-mirror/libcxx.git CHECKOUT_LIBCXX=1 fi +if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBUNWIND" ]; then + cd libunwind + [ -z "$SYNC" ] || git fetch + git checkout 2ddcf2461daa5d61c543474aed06b12a8b9ad816 + cd .. +fi +if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBCXXABI" ]; then + cd libcxxabi + [ -z "$SYNC" ] || git fetch + git checkout 05ba3281482304ae8de31123a594972a495da06d + cd .. +fi +if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBCXX" ]; then + cd libcxx + [ -z "$SYNC" ] || git fetch + git checkout 16eb426933cdb1c54fd6fbba5fc06cc5a4ca52b3 + cd .. +fi LIBCXX=$(pwd)/libcxx MERGE_ARCHIVES=$(pwd)/merge-archives.sh cd libunwind -if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBUNWIND" ]; then - [ -z "$SYNC" ] || git fetch - git checkout 2ddcf2461daa5d61c543474aed06b12a8b9ad816 -fi for arch in $ARCHS; do mkdir -p build-$arch cd build-$arch @@ -67,10 +81,6 @@ done cd .. cd libcxxabi -if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBCXXABI" ]; then - [ -z "$SYNC" ] || git fetch - git checkout 05ba3281482304ae8de31123a594972a495da06d -fi for arch in $ARCHS; do mkdir -p build-$arch cd build-$arch @@ -101,10 +111,6 @@ done cd .. cd libcxx -if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBCXX" ]; then - [ -z "$SYNC" ] || git fetch - git checkout 16eb426933cdb1c54fd6fbba5fc06cc5a4ca52b3 -fi for arch in $ARCHS; do mkdir -p build-$arch cd build-$arch