diff options
| author | Louis Dionne <ldionne@apple.com> | 2019-02-05 16:42:37 +0000 |
|---|---|---|
| committer | Louis Dionne <ldionne@apple.com> | 2019-02-05 16:42:37 +0000 |
| commit | a3ec627a1c60ead93207cbd147b6faaf028231bd (patch) | |
| tree | 2f4e5925f47eb5d03ae6fcc641e4867f7b8ee36b /libcxx/utils | |
| parent | 9871db064d3ee0d364d4d50a9f95e5d51804e19b (diff) | |
| download | bcm5719-llvm-a3ec627a1c60ead93207cbd147b6faaf028231bd.tar.gz bcm5719-llvm-a3ec627a1c60ead93207cbd147b6faaf028231bd.zip | |
[libc++] Control whether exceptions are enabled in the macOS trunk testing script
llvm-svn: 353185
Diffstat (limited to 'libcxx/utils')
| -rwxr-xr-x | libcxx/utils/ci/macos-trunk.sh | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/libcxx/utils/ci/macos-trunk.sh b/libcxx/utils/ci/macos-trunk.sh index b365cc6d8e3..b64633387b2 100755 --- a/libcxx/utils/ci/macos-trunk.sh +++ b/libcxx/utils/ci/macos-trunk.sh @@ -8,13 +8,14 @@ $(basename ${0}) [-h|--help] --libcxx-root <LIBCXX-ROOT> --libcxxabi-root <LIBCX 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 "--libcxx-root is a required parameter"; 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 ) |

