[libcxx-commits] [libcxx] r366601 - [libc++] Allow passing additional CMake arguments in macOS trunk CI script

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 19 11:47:00 PDT 2019


Author: ldionne
Date: Fri Jul 19 11:47:00 2019
New Revision: 366601

URL: http://llvm.org/viewvc/llvm-project?rev=366601&view=rev
Log:
[libc++] Allow passing additional CMake arguments in 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=366601&r1=366600&r2=366601&view=diff
==============================================================================
--- libcxx/trunk/utils/ci/macos-trunk.sh (original)
+++ libcxx/trunk/utils/ci/macos-trunk.sh Fri Jul 19 11:47:00 2019
@@ -13,7 +13,8 @@ This script is used to continually test
   --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.
-  [--lit-args]        Additional arguments to pass to lit (optional). If there are multiple arguments, quote them to pass them as a single argument to this script.
+  [--cmake-args]      Additional arguments to pass to CMake (both the libc++ and the libc++abi configuration). If there are multiple arguments, quote them to paass them as a single argument to this script.
+  [--lit-args]        Additional arguments to pass to lit. If there are multiple arguments, quote them to pass them as a single argument to this script.
   [--no-cleanup]      Do not cleanup the temporary directory that was used for testing at the end. This can be useful to debug failures. Make sure to clean up manually after.
   [-h, --help]        Print this help.
 EOM
@@ -51,6 +52,10 @@ while [[ $# -gt 0 ]]; do
     LIBCXX_EXCEPTIONS="${2}"
     shift; shift
     ;;
+    --cmake-args)
+    ADDITIONAL_CMAKE_ARGS="${2}"
+    shift; shift
+    ;;
     --lit-args)
     ADDITIONAL_LIT_ARGS="${2}"
     shift; shift
@@ -76,6 +81,7 @@ if [[ -z ${LIBCXXABI_ROOT+x} ]]; then ec
 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
+if [[ -z ${ADDITIONAL_CMAKE_ARGS+x} ]]; then ADDITIONAL_CMAKE_ARGS=""; fi
 if [[ -z ${ADDITIONAL_LIT_ARGS+x} ]]; then ADDITIONAL_LIT_ARGS=""; fi
 
 
@@ -122,6 +128,7 @@ mkdir -p "${LIBCXX_BUILD_DIR}"
     -DCMAKE_INSTALL_PREFIX="${LIBCXX_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
 )
@@ -137,6 +144,7 @@ mkdir -p "${LIBCXXABI_BUILD_DIR}"
     -DCMAKE_INSTALL_PREFIX="${LIBCXXABI_INSTALL_DIR}" \
     -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \
     -DLIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS=ON \
+    ${ADDITIONAL_CMAKE_ARGS} \
     -DLLVM_LIT_ARGS="${LIT_FLAGS}" \
     -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" # Build a universal dylib
 )




More information about the libcxx-commits mailing list