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
}
ARCH="${2}"
shift; shift
;;
+ --libcxx-exceptions)
+ LIBCXX_EXCEPTIONS="${2}"
+ shift; shift
+ ;;
--lit-args)
ADDITIONAL_LIT_ARGS="${2}"
shift; shift
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
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
)
-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
)