[libcxx-commits] [libcxx] r368051 - [libc++] Use the monorepo in the macos-trunk CI script

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 6 08:28:34 PDT 2019


Author: ldionne
Date: Tue Aug  6 08:28:34 2019
New Revision: 368051

URL: http://llvm.org/viewvc/llvm-project?rev=368051&view=rev
Log:
[libc++] Use the monorepo in the macos-trunk CI script

Modified:
    libcxx/trunk/utils/ci/macos-trunk.sh

Modified: libcxx/trunk/utils/ci/macos-trunk.sh
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/ci/macos-trunk.sh?rev=368051&r1=368050&r2=368051&view=diff
==============================================================================
--- libcxx/trunk/utils/ci/macos-trunk.sh (original)
+++ libcxx/trunk/utils/ci/macos-trunk.sh Tue Aug  6 08:28:34 2019
@@ -8,8 +8,7 @@ $(basename ${0}) [-h|--help] --libcxx-ro
 
 This script is used to continually test libc++ and libc++abi trunk on MacOS.
 
-  --libcxx-root       Full path to the root of the libc++ repository to test.
-  --libcxxabi-root    Full path to the root of the libc++abi repository to test.
+  --monorepo-root     Full path to the root of the LLVM monorepo. Both libc++ and libc++abi from the monorepo are used.
   --std               Version of the C++ Standard to run the tests under (c++03, c++11, etc..).
   --arch              Architecture to build the tests for (32, 64).
   --libcxx-exceptions Whether to enable exceptions when building libc++ and running the libc++ tests. libc++abi is always built with support for exceptions because other libraries in the runtime depend on it (like libobjc). This must be ON or OFF.
@@ -22,19 +21,10 @@ EOM
 
 while [[ $# -gt 0 ]]; do
   case "$1" in
-    --libcxx-root)
-    LIBCXX_ROOT="${2}"
-    if [[ ! -e "${LIBCXX_ROOT}" ]]; then
-      echo "--libcxx-root '${LIBCXX_ROOT}' is not a valid directory"
-      usage
-      exit 1
-    fi
-    shift; shift
-    ;;
-    --libcxxabi-root)
-    LIBCXXABI_ROOT="${2}"
-    if [[ ! -e "${LIBCXXABI_ROOT}" ]]; then
-      echo "--libcxxabi-root '${LIBCXXABI_ROOT}' is not a valid directory"
+    --monorepo-root)
+    MONOREPO_ROOT="${2}"
+    if [[ ! -e "${MONOREPO_ROOT}" ]]; then
+      echo "--monorepo-root '${MONOREPO_ROOT}' is not a valid directory"
       usage
       exit 1
     fi
@@ -76,8 +66,7 @@ while [[ $# -gt 0 ]]; do
   esac
 done
 
-if [[ -z ${LIBCXX_ROOT+x} ]]; then echo "--libcxx-root is a required parameter"; usage; exit 1; fi
-if [[ -z ${LIBCXXABI_ROOT+x} ]]; then echo "--libcxxabi-root is a required parameter"; usage; exit 1; fi
+if [[ -z ${MONOREPO_ROOT+x} ]]; then echo "--monorepo-root is a required parameter"; usage; exit 1; fi
 if [[ -z ${STD+x} ]]; then echo "--std is a required parameter"; usage; exit 1; fi
 if [[ -z ${ARCH+x} ]]; then echo "--arch is a required parameter"; usage; exit 1; fi
 if [[ "${LIBCXX_EXCEPTIONS}" != "ON" && "${LIBCXX_EXCEPTIONS}" != "OFF" ]]; then echo "--libcxx-exceptions is a required parameter and must be either ON or OFF"; usage; exit 1; fi
@@ -98,19 +87,8 @@ function cleanup {
 trap cleanup EXIT
 
 
-LLVM_ROOT="${TEMP_DIR}/llvm"
-LIBCXX_BUILD_DIR="${TEMP_DIR}/libcxx-build"
-LIBCXX_INSTALL_DIR="${TEMP_DIR}/libcxx-install"
-LIBCXXABI_BUILD_DIR="${TEMP_DIR}/libcxxabi-build"
-LIBCXXABI_INSTALL_DIR="${TEMP_DIR}/libcxxabi-install"
-
-
-echo "@@@ Downloading LLVM tarball of master (only used for CMake configuration) @@@"
-mkdir "${LLVM_ROOT}"
-LLVM_TARBALL_URL="https://github.com/llvm-mirror/llvm/archive/master.tar.gz"
-curl -L "${LLVM_TARBALL_URL}" | tar -xz --strip-components=1 -C "${LLVM_ROOT}"
-echo "@@@@@@"
-
+LLVM_BUILD_DIR="${TEMP_DIR}/llvm-build"
+LLVM_INSTALL_DIR="${TEMP_DIR}/llvm-install"
 
 echo "@@@ Setting up LIT flags @@@"
 LIT_FLAGS="-sv --param=std=${STD} ${ADDITIONAL_LIT_ARGS}"
@@ -120,49 +98,34 @@ fi
 echo "@@@@@@"
 
 
-echo "@@@ Configuring CMake for libc++ @@@"
-mkdir -p "${LIBCXX_BUILD_DIR}"
-(cd "${LIBCXX_BUILD_DIR}" &&
-  xcrun cmake "${LIBCXX_ROOT}" -GNinja \
-    -DLLVM_PATH="${LLVM_ROOT}" \
-    -DCMAKE_INSTALL_PREFIX="${LIBCXX_INSTALL_DIR}" \
+echo "@@@ Configuring CMake @@@"
+mkdir -p "${LLVM_BUILD_DIR}"
+(cd "${LLVM_BUILD_DIR}" &&
+  xcrun cmake "${MONOREPO_ROOT}/llvm" -GNinja \
+    -DCMAKE_INSTALL_PREFIX="${LLVM_INSTALL_DIR}" \
     -DLIBCXX_ENABLE_EXCEPTIONS="${LIBCXX_EXCEPTIONS}" \
     -DLIBCXX_ENABLE_NEW_DELETE_DEFINITIONS=OFF \
-    ${ADDITIONAL_CMAKE_ARGS} \
-    -DLLVM_LIT_ARGS="${LIT_FLAGS}" \
-    -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" # Build a universal dylib
-)
-echo "@@@@@@"
-
-
-echo "@@@ Configuring CMake for libc++abi @@@"
-mkdir -p "${LIBCXXABI_BUILD_DIR}"
-(cd "${LIBCXXABI_BUILD_DIR}" &&
-  xcrun cmake "${LIBCXXABI_ROOT}" -GNinja \
-    -DLIBCXXABI_LIBCXX_PATH="${LIBCXX_ROOT}" \
-    -DLLVM_PATH="${LLVM_ROOT}" \
-    -DCMAKE_INSTALL_PREFIX="${LIBCXXABI_INSTALL_DIR}" \
     -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \
     -DLIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS=ON \
     ${ADDITIONAL_CMAKE_ARGS} \
     -DLLVM_LIT_ARGS="${LIT_FLAGS}" \
+    -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
     -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" # Build a universal dylib
 )
 echo "@@@@@@"
 
 
 echo "@@@ Building libc++.dylib and libc++abi.dylib from sources (just to make sure it works) @@@"
-ninja -C "${LIBCXX_BUILD_DIR}" install-cxx -v
-ninja -C "${LIBCXXABI_BUILD_DIR}" install-cxxabi -v
+ninja -C "${LLVM_BUILD_DIR}" install-cxx install-cxxabi -v
 echo "@@@@@@"
 
 
 echo "@@@ Running tests for libc++ @@@"
 # TODO: We should run check-cxx-abilist too
-ninja -C "${LIBCXX_BUILD_DIR}" check-cxx
+ninja -C "${LLVM_BUILD_DIR}" check-cxx
 echo "@@@@@@"
 
 
 echo "@@@ Running tests for libc++abi @@@"
-ninja -C "${LIBCXXABI_BUILD_DIR}" check-cxxabi
+ninja -C "${LLVM_BUILD_DIR}" check-cxxabi
 echo "@@@@@@"




More information about the libcxx-commits mailing list