[libcxx-commits] [libcxx] r353185 - [libc++] Control whether exceptions are enabled in the macOS trunk testing script
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 5 08:42:37 PST 2019
Author: ldionne
Date: Tue Feb 5 08:42:37 2019
New Revision: 353185
URL: http://llvm.org/viewvc/llvm-project?rev=353185&view=rev
Log:
[libc++] Control whether exceptions are enabled in the macOS trunk testing 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=353185&r1=353184&r2=353185&view=diff
==============================================================================
--- libcxx/trunk/utils/ci/macos-trunk.sh (original)
+++ libcxx/trunk/utils/ci/macos-trunk.sh Tue Feb 5 08:42:37 2019
@@ -8,13 +8,14 @@ $(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.
- --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).
- [--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.
- [--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.
+ --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.
+ --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.
+ [--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
}
@@ -46,6 +47,10 @@ while [[ $# -gt 0 ]]; do
ARCH="${2}"
shift; shift
;;
+ --libcxx-exceptions)
+ LIBCXX_EXCEPTIONS="${2}"
+ shift; shift
+ ;;
--lit-args)
ADDITIONAL_LIT_ARGS="${2}"
shift; shift
@@ -70,6 +75,7 @@ if [[ -z ${LIBCXX_ROOT+x} ]]; then echo
if [[ -z ${LIBCXXABI_ROOT+x} ]]; then echo "--libcxxabi-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
if [[ -z ${ADDITIONAL_LIT_ARGS+x} ]]; then ADDITIONAL_LIT_ARGS=""; fi
@@ -117,6 +123,7 @@ mkdir -p "${LIBCXX_BUILD_DIR}"
xcrun cmake "${LIBCXX_ROOT}" -GNinja \
-DLLVM_PATH="${LLVM_ROOT}" \
-DCMAKE_INSTALL_PREFIX="${LIBCXX_INSTALL_DIR}" \
+ -DLIBCXX_ENABLE_EXCEPTIONS="${LIBCXX_EXCEPTIONS}" \
-DLLVM_LIT_ARGS="${LIT_FLAGS}" \
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" # Build a universal dylib
)
@@ -130,6 +137,7 @@ mkdir -p "${LIBCXXABI_BUILD_DIR}"
-DLIBCXXABI_LIBCXX_PATH="${LIBCXX_ROOT}" \
-DLLVM_PATH="${LLVM_ROOT}" \
-DCMAKE_INSTALL_PREFIX="${LIBCXXABI_INSTALL_DIR}" \
+ -DLIBCXXABI_ENABLE_EXCEPTIONS=ON \
-DLLVM_LIT_ARGS="${LIT_FLAGS}" \
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" # Build a universal dylib
)
More information about the libcxx-commits
mailing list