Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | #===----------------------------------------------------------------------===## |
| 3 | # |
| 4 | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | # See https://llvm.org/LICENSE.txt for license information. |
| 6 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 7 | # |
| 8 | #===----------------------------------------------------------------------===## |
| 9 | |
| 10 | set -ex |
Marek Kurdej | 0544936 | 2021-02-04 21:13:22 +0100 | [diff] [blame] | 11 | set -o pipefail |
Arthur O'Dwyer | 757d5bd | 2021-04-30 14:43:33 -0400 | [diff] [blame] | 12 | unset LANG |
| 13 | unset LC_ALL |
| 14 | unset LC_COLLATE |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 15 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 16 | PROGNAME="$(basename "${0}")" |
| 17 | |
| 18 | function usage() { |
| 19 | cat <<EOF |
| 20 | Usage: |
| 21 | ${PROGNAME} [options] <BUILDER> |
| 22 | |
| 23 | [-h|--help] Display this help and exit. |
| 24 | |
| 25 | --llvm-root <DIR> Path to the root of the LLVM monorepo. By default, we try |
| 26 | to figure it out based on the current working directory. |
| 27 | |
Louis Dionne | 04bf103 | 2020-11-05 19:09:03 -0500 | [diff] [blame] | 28 | --build-dir <DIR> The directory to use for building the library. By default, |
| 29 | this is '<llvm-root>/build/<builder>'. |
| 30 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 31 | --osx-roots <DIR> Path to pre-downloaded macOS dylibs. By default, we download |
| 32 | them from Green Dragon. This is only relevant at all when |
| 33 | running back-deployment testing if one wants to override |
| 34 | the old dylibs we use to run the tests with different ones. |
| 35 | EOF |
| 36 | } |
| 37 | |
| 38 | while [[ $# -gt 0 ]]; do |
| 39 | case ${1} in |
| 40 | -h|--help) |
| 41 | usage |
| 42 | exit 0 |
| 43 | ;; |
| 44 | --llvm-root) |
| 45 | MONOREPO_ROOT="${2}" |
| 46 | shift; shift |
| 47 | ;; |
Louis Dionne | 04bf103 | 2020-11-05 19:09:03 -0500 | [diff] [blame] | 48 | --build-dir) |
| 49 | BUILD_DIR="${2}" |
| 50 | shift; shift |
| 51 | ;; |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 52 | --osx-roots) |
| 53 | OSX_ROOTS="${2}" |
| 54 | shift; shift |
| 55 | ;; |
| 56 | *) |
| 57 | BUILDER="${1}" |
| 58 | shift |
| 59 | ;; |
| 60 | esac |
| 61 | done |
| 62 | |
| 63 | MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}" |
Louis Dionne | 04bf103 | 2020-11-05 19:09:03 -0500 | [diff] [blame] | 64 | BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build/${BUILDER}}" |
Louis Dionne | 485f4c0 | 2021-01-07 17:37:09 -0500 | [diff] [blame] | 65 | INSTALL_DIR="${BUILD_DIR}/install" |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 66 | |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 67 | # If we can find Ninja/CMake provided by Xcode, use those since we know their |
| 68 | # version will generally work with the Clang shipped in Xcode (e.g. if Clang |
| 69 | # knows about -std=c++20, the CMake bundled in Xcode will probably know about |
| 70 | # that flag too). |
| 71 | if xcrun --find ninja &>/dev/null; then NINJA="$(xcrun --find ninja)"; else NINJA="ninja"; fi |
| 72 | if xcrun --find cmake &>/dev/null; then CMAKE="$(xcrun --find cmake)"; else CMAKE="cmake"; fi |
Louis Dionne | 7a8d536 | 2021-03-04 16:01:36 -0500 | [diff] [blame] | 73 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 74 | function clean() { |
| 75 | rm -rf "${BUILD_DIR}" |
| 76 | } |
| 77 | |
Martin Storsjö | 47cd346 | 2021-04-06 00:17:30 +0300 | [diff] [blame] | 78 | function generate-cmake-base() { |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 79 | echo "--- Generating CMake" |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 80 | ${CMAKE} \ |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 81 | -B "${BUILD_DIR}" \ |
Louis Dionne | 7a8d536 | 2021-03-04 16:01:36 -0500 | [diff] [blame] | 82 | -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \ |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 83 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 84 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 85 | -DLLVM_LIT_ARGS="-sv --show-unsupported --xunit-xml-output test-results.xml" \ |
Martin Storsjö | 47cd346 | 2021-04-06 00:17:30 +0300 | [diff] [blame] | 86 | "${@}" |
| 87 | } |
| 88 | |
| 89 | function generate-cmake() { |
| 90 | generate-cmake-base \ |
| 91 | -S "${MONOREPO_ROOT}/llvm" \ |
| 92 | -DLLVM_ENABLE_PROJECTS="libcxx;libunwind;libcxxabi" \ |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 93 | -DLIBCXX_CXX_ABI=libcxxabi \ |
Louis Dionne | 662aaa2 | 2020-11-05 10:47:06 -0500 | [diff] [blame] | 94 | "${@}" |
| 95 | } |
| 96 | |
Martin Storsjö | 47cd346 | 2021-04-06 00:17:30 +0300 | [diff] [blame] | 97 | function generate-cmake-libcxx-win() { |
| 98 | # TODO: Clang-cl in MSVC configurations don't have access to compiler_rt |
| 99 | # builtins helpers for int128 division. See |
| 100 | # https://reviews.llvm.org/D91139#2429595 for a comment about longterm |
| 101 | # intent for handling the issue. In the meantime, define |
| 102 | # -D_LIBCPP_HAS_NO_INT128 (both when building the library itself and |
| 103 | # when building tests) to allow enabling filesystem for running tests, |
| 104 | # even if it uses a non-permanent ABI. |
| 105 | |
| 106 | generate-cmake-base \ |
| 107 | -S "${MONOREPO_ROOT}/libcxx" \ |
| 108 | -DCMAKE_C_COMPILER=clang-cl \ |
| 109 | -DCMAKE_CXX_COMPILER=clang-cl \ |
| 110 | -DLIBCXX_ENABLE_FILESYSTEM=YES \ |
| 111 | -DCMAKE_CXX_FLAGS="-D_LIBCPP_HAS_NO_INT128" \ |
| 112 | -DLIBCXX_TEST_COMPILER_FLAGS="-D_LIBCPP_HAS_NO_INT128" \ |
| 113 | "${@}" |
| 114 | } |
| 115 | |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 116 | function check-cxx-cxxabi() { |
Louis Dionne | eacce54 | 2021-03-24 09:50:59 -0400 | [diff] [blame] | 117 | echo "--- Installing libc++ and libc++abi to a fake location" |
| 118 | ${NINJA} -vC "${BUILD_DIR}" install-cxx install-cxxabi |
| 119 | |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 120 | echo "+++ Running the libc++ tests" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 121 | ${NINJA} -vC "${BUILD_DIR}" check-cxx |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 122 | |
| 123 | echo "+++ Running the libc++abi tests" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 124 | ${NINJA} -vC "${BUILD_DIR}" check-cxxabi |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 125 | } |
| 126 | |
Louis Dionne | dfbd00e | 2020-11-26 15:00:42 -0500 | [diff] [blame] | 127 | # TODO: The goal is to test this against all configurations. We should also move |
| 128 | # this to the Lit test suite instead of being a separate CMake target. |
| 129 | function check-abi-list() { |
| 130 | echo "+++ Running the libc++ ABI list test" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 131 | ${NINJA} -vC "${BUILD_DIR}" check-cxx-abilist || ( |
Marek Kurdej | 718b62c | 2020-12-02 08:57:02 +0100 | [diff] [blame] | 132 | echo "+++ Generating the libc++ ABI list after failed check" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 133 | ${NINJA} -vC "${BUILD_DIR}" generate-cxx-abilist |
Marek Kurdej | 718b62c | 2020-12-02 08:57:02 +0100 | [diff] [blame] | 134 | false |
| 135 | ) |
Louis Dionne | dfbd00e | 2020-11-26 15:00:42 -0500 | [diff] [blame] | 136 | } |
| 137 | |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 138 | function check-cxx-benchmarks() { |
| 139 | echo "--- Running the benchmarks" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 140 | ${NINJA} -vC "${BUILD_DIR}" check-cxx-benchmarks |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 141 | } |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 142 | |
Louis Dionne | 6bd3e65 | 2021-04-01 13:40:04 -0400 | [diff] [blame] | 143 | # Print the version of a few tools to aid diagnostics in some cases |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 144 | ${CMAKE} --version |
Louis Dionne | 6bd3e65 | 2021-04-01 13:40:04 -0400 | [diff] [blame] | 145 | ${NINJA} --version |
| 146 | |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 147 | case "${BUILDER}" in |
Marek Kurdej | 0544936 | 2021-02-04 21:13:22 +0100 | [diff] [blame] | 148 | check-format) |
| 149 | clean |
| 150 | echo "+++ Checking formatting" |
| 151 | # We need to set --extensions so that clang-format checks extensionless files. |
| 152 | mkdir -p ${BUILD_DIR} |
| 153 | git-clang-format \ |
| 154 | --binary /usr/bin/clang-format --diff \ |
| 155 | --extensions ',h,hh,hpp,hxx,c,cc,cxx,cpp' HEAD~1 \ |
| 156 | -- \ |
| 157 | libcxx/{benchmarks,include,src,test} \ |
| 158 | libcxxabi/{fuzz,include,src,test} \ |
| 159 | | tee ${BUILD_DIR}/clang-format.patch |
| 160 | # Check if the diff is empty, fail otherwise. |
| 161 | ! grep -q '^--- a' ${BUILD_DIR}/clang-format.patch |
| 162 | ;; |
Mark de Wever | 53efa10 | 2021-04-04 20:11:48 +0200 | [diff] [blame] | 163 | check-generated-output) |
Mark de Wever | b10c97d | 2021-04-28 19:13:52 +0200 | [diff] [blame] | 164 | # `! foo` doesn't work properly with `set -e`, use `! foo || false` instead. |
| 165 | # https://stackoverflow.com/questions/57681955/set-e-does-not-respect-logical-not |
Mark de Wever | 53efa10 | 2021-04-04 20:11:48 +0200 | [diff] [blame] | 166 | clean |
Arthur O'Dwyer | bba78c3 | 2021-04-17 09:56:34 -0400 | [diff] [blame] | 167 | echo "+++ Checking the output of the generator scripts" |
Mark de Wever | 53efa10 | 2021-04-04 20:11:48 +0200 | [diff] [blame] | 168 | mkdir -p ${BUILD_DIR} |
Arthur O'Dwyer | bba78c3 | 2021-04-17 09:56:34 -0400 | [diff] [blame] | 169 | # Reject patches that don't update the generated output correctly. |
Mark de Wever | 53efa10 | 2021-04-04 20:11:48 +0200 | [diff] [blame] | 170 | python3 libcxx/utils/generate_feature_test_macro_components.py |
| 171 | python3 libcxx/utils/generate_header_inclusion_tests.py |
| 172 | python3 libcxx/utils/generate_header_tests.py |
| 173 | git diff | tee ${BUILD_DIR}/generated_output.patch |
| 174 | # Check if the diffs are empty, fail otherwise. |
Mark de Wever | b10c97d | 2021-04-28 19:13:52 +0200 | [diff] [blame] | 175 | ! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch || false |
| 176 | # Reject patches that introduce non-ASCII characters or hard tabs. |
Arthur O'Dwyer | 757d5bd | 2021-04-30 14:43:33 -0400 | [diff] [blame] | 177 | # Depends on LC_COLLATE set at the top of this script. |
Mark de Wever | b10c97d | 2021-04-28 19:13:52 +0200 | [diff] [blame] | 178 | ! grep -rn '[^ -~]' libcxx/include/ || false |
Arthur O'Dwyer | bba78c3 | 2021-04-17 09:56:34 -0400 | [diff] [blame] | 179 | # Check that no dependency cycles have been introduced. |
| 180 | python3 libcxx/utils/graph_header_deps.py >/dev/null |
Mark de Wever | 53efa10 | 2021-04-04 20:11:48 +0200 | [diff] [blame] | 181 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 182 | generic-cxx03) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 183 | export CC=clang |
| 184 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 185 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 186 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" |
| 187 | check-cxx-cxxabi |
Louis Dionne | dfbd00e | 2020-11-26 15:00:42 -0500 | [diff] [blame] | 188 | check-abi-list |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 189 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 190 | generic-cxx11) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 191 | export CC=clang |
| 192 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 193 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 194 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake" |
| 195 | check-cxx-cxxabi |
Louis Dionne | dfbd00e | 2020-11-26 15:00:42 -0500 | [diff] [blame] | 196 | check-abi-list |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 197 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 198 | generic-cxx14) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 199 | export CC=clang |
| 200 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 201 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 202 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake" |
| 203 | check-cxx-cxxabi |
Louis Dionne | dfbd00e | 2020-11-26 15:00:42 -0500 | [diff] [blame] | 204 | check-abi-list |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 205 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 206 | generic-cxx17) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 207 | export CC=clang |
| 208 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 209 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 210 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake" |
| 211 | check-cxx-cxxabi |
Louis Dionne | dfbd00e | 2020-11-26 15:00:42 -0500 | [diff] [blame] | 212 | check-abi-list |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 213 | ;; |
Marek Kurdej | 24b4c51 | 2021-01-07 12:29:04 +0100 | [diff] [blame] | 214 | generic-cxx20) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 215 | export CC=clang |
| 216 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 217 | clean |
Marek Kurdej | 24b4c51 | 2021-01-07 12:29:04 +0100 | [diff] [blame] | 218 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake" |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 219 | check-cxx-cxxabi |
Louis Dionne | dfbd00e | 2020-11-26 15:00:42 -0500 | [diff] [blame] | 220 | check-abi-list |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 221 | ;; |
Marek Kurdej | 758067c | 2021-01-08 18:40:42 +0100 | [diff] [blame] | 222 | generic-cxx2b) |
| 223 | export CC=clang-tot |
| 224 | export CXX=clang++-tot |
| 225 | clean |
| 226 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake" |
| 227 | check-cxx-cxxabi |
| 228 | check-abi-list |
| 229 | ;; |
Arthur O'Dwyer | 64e0247 | 2021-04-20 11:27:03 -0400 | [diff] [blame] | 230 | generic-debug-iterators) |
| 231 | export CC=clang-tot |
| 232 | export CXX=clang++-tot |
| 233 | clean |
| 234 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-debug-iterators.cmake" |
| 235 | check-cxx-cxxabi |
| 236 | check-abi-list |
| 237 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 238 | generic-noexceptions) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 239 | export CC=clang |
| 240 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 241 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 242 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-noexceptions.cmake" |
| 243 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 244 | ;; |
Louis Dionne | eacce54 | 2021-03-24 09:50:59 -0400 | [diff] [blame] | 245 | generic-static) |
| 246 | export CC=clang |
| 247 | export CXX=clang++ |
| 248 | clean |
| 249 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-static.cmake" |
| 250 | check-cxx-cxxabi |
| 251 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 252 | generic-32bit) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 253 | export CC=clang |
| 254 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 255 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 256 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-32bits.cmake" |
| 257 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 258 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 259 | generic-gcc) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 260 | export CC=gcc |
| 261 | export CXX=g++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 262 | clean |
Louis Dionne | eacce54 | 2021-03-24 09:50:59 -0400 | [diff] [blame] | 263 | generate-cmake |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 264 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 265 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 266 | generic-asan) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 267 | export CC=clang |
| 268 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 269 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 270 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-asan.cmake" |
| 271 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 272 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 273 | generic-msan) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 274 | export CC=clang |
| 275 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 276 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 277 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-msan.cmake" |
| 278 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 279 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 280 | generic-tsan) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 281 | export CC=clang |
| 282 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 283 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 284 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-tsan.cmake" |
| 285 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 286 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 287 | generic-ubsan) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 288 | export CC=clang |
| 289 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 290 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 291 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-ubsan.cmake" |
| 292 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 293 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 294 | generic-with_llvm_unwinder) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 295 | export CC=clang |
| 296 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 297 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 298 | generate-cmake -DLIBCXXABI_USE_LLVM_UNWINDER=ON |
| 299 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 300 | ;; |
Louis Dionne | 6f8038c | 2020-10-01 13:55:39 -0400 | [diff] [blame] | 301 | generic-singlethreaded) |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 302 | export CC=clang |
| 303 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 304 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 305 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-singlethreaded.cmake" |
| 306 | check-cxx-cxxabi |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 307 | ;; |
Louis Dionne | abcfdbc | 2021-03-23 14:09:52 -0400 | [diff] [blame] | 308 | generic-no-debug) |
Louis Dionne | 4396f9b | 2020-10-06 16:46:58 -0400 | [diff] [blame] | 309 | export CC=clang |
| 310 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 311 | clean |
Louis Dionne | abcfdbc | 2021-03-23 14:09:52 -0400 | [diff] [blame] | 312 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-debug.cmake" |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 313 | check-cxx-cxxabi |
Louis Dionne | 4396f9b | 2020-10-06 16:46:58 -0400 | [diff] [blame] | 314 | ;; |
Louis Dionne | db84e12 | 2021-01-18 12:18:18 -0500 | [diff] [blame] | 315 | generic-no-filesystem) |
| 316 | export CC=clang |
| 317 | export CXX=clang++ |
| 318 | clean |
| 319 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-filesystem.cmake" |
| 320 | check-cxx-cxxabi |
| 321 | ;; |
Louis Dionne | 3777e68 | 2020-10-15 10:32:09 -0400 | [diff] [blame] | 322 | generic-no-random_device) |
| 323 | export CC=clang |
| 324 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 325 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 326 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-random_device.cmake" |
| 327 | check-cxx-cxxabi |
Louis Dionne | 3777e68 | 2020-10-15 10:32:09 -0400 | [diff] [blame] | 328 | ;; |
Louis Dionne | 8d053eb | 2020-10-09 15:31:05 -0400 | [diff] [blame] | 329 | generic-no-localization) |
| 330 | export CC=clang |
| 331 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 332 | clean |
Louis Dionne | 8d053eb | 2020-10-09 15:31:05 -0400 | [diff] [blame] | 333 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-localization.cmake" |
| 334 | check-cxx-cxxabi |
| 335 | ;; |
Louis Dionne | 89d0eb2 | 2020-10-01 08:55:40 -0400 | [diff] [blame] | 336 | x86_64-apple-system) |
| 337 | export CC=clang |
| 338 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 339 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 340 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" |
| 341 | check-cxx-cxxabi |
Louis Dionne | 89d0eb2 | 2020-10-01 08:55:40 -0400 | [diff] [blame] | 342 | ;; |
| 343 | x86_64-apple-system-noexceptions) |
| 344 | export CC=clang |
| 345 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 346 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 347 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \ |
| 348 | -DLIBCXX_ENABLE_EXCEPTIONS=OFF \ |
| 349 | -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF |
| 350 | check-cxx-cxxabi |
| 351 | ;; |
Louis Dionne | 662aaa2 | 2020-11-05 10:47:06 -0500 | [diff] [blame] | 352 | x86_64-apple-system-backdeployment-*) |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 353 | clean |
Louis Dionne | 662aaa2 | 2020-11-05 10:47:06 -0500 | [diff] [blame] | 354 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 355 | if [[ "${OSX_ROOTS}" == "" ]]; then |
| 356 | echo "--- Downloading previous macOS dylibs" |
Louis Dionne | c767535 | 2021-03-25 14:14:20 -0400 | [diff] [blame] | 357 | PREVIOUS_DYLIBS_URL="https://dl.dropboxusercontent.com/s/liu4fmc53qzlfly/libcxx-roots.tar.gz" |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 358 | OSX_ROOTS="${BUILD_DIR}/macos-roots" |
| 359 | mkdir -p "${OSX_ROOTS}" |
| 360 | curl "${PREVIOUS_DYLIBS_URL}" | tar -xz --strip-components=1 -C "${OSX_ROOTS}" |
| 361 | fi |
Louis Dionne | 662aaa2 | 2020-11-05 10:47:06 -0500 | [diff] [blame] | 362 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 363 | DEPLOYMENT_TARGET="${BUILDER#x86_64-apple-system-backdeployment-}" |
Louis Dionne | 84ad13b | 2020-07-08 16:38:54 -0400 | [diff] [blame] | 364 | |
| 365 | # TODO: On Apple platforms, we never produce libc++abi.1.dylib, always libc++abi.dylib. |
| 366 | # Fix that in the build so that the tests stop searching for @rpath/libc++abi.1.dylib. |
| 367 | cp "${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}/libc++abi.dylib" \ |
| 368 | "${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}/libc++abi.1.dylib" |
| 369 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 370 | PARAMS="target_triple=x86_64-apple-macosx${DEPLOYMENT_TARGET}" |
| 371 | PARAMS+=";cxx_runtime_root=${OSX_ROOTS}/macOS/libc++/${DEPLOYMENT_TARGET}" |
Louis Dionne | 84ad13b | 2020-07-08 16:38:54 -0400 | [diff] [blame] | 372 | PARAMS+=";abi_runtime_root=${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}" |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 373 | PARAMS+=";use_system_cxx_lib=True" |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 374 | |
| 375 | export CC=clang |
| 376 | export CXX=clang++ |
| 377 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \ |
| 378 | -DLIBCXX_TEST_PARAMS="${PARAMS}" \ |
| 379 | -DLIBCXXABI_TEST_PARAMS="${PARAMS}" |
| 380 | |
Louis Dionne | 84ad13b | 2020-07-08 16:38:54 -0400 | [diff] [blame] | 381 | check-cxx-cxxabi |
Louis Dionne | 662aaa2 | 2020-11-05 10:47:06 -0500 | [diff] [blame] | 382 | ;; |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 383 | benchmarks) |
| 384 | export CC=clang |
| 385 | export CXX=clang++ |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 386 | clean |
Louis Dionne | f9c11b0 | 2020-10-23 10:02:14 -0400 | [diff] [blame] | 387 | generate-cmake |
| 388 | check-cxx-benchmarks |
Louis Dionne | 89d0eb2 | 2020-10-01 08:55:40 -0400 | [diff] [blame] | 389 | ;; |
Louis Dionne | aa4e44f | 2020-11-05 14:34:29 -0500 | [diff] [blame] | 390 | documentation) |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 391 | export CC=clang |
| 392 | export CXX=clang++ |
| 393 | clean |
| 394 | generate-cmake -DLLVM_ENABLE_SPHINX=ON |
| 395 | |
| 396 | echo "+++ Generating documentation" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 397 | ${NINJA} -vC "${BUILD_DIR}" docs-libcxx-html |
Louis Dionne | aa4e44f | 2020-11-05 14:34:29 -0500 | [diff] [blame] | 398 | ;; |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 399 | unified-standalone) |
| 400 | export CC=clang |
| 401 | export CXX=clang++ |
| 402 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 403 | clean |
| 404 | |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 405 | echo "--- Generating CMake" |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 406 | ${CMAKE} \ |
| 407 | -S "${MONOREPO_ROOT}/libcxx/utils/ci/runtimes" \ |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 408 | -B "${BUILD_DIR}" \ |
Louis Dionne | 7a8d536 | 2021-03-04 16:01:36 -0500 | [diff] [blame] | 409 | -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \ |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 410 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 411 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
| 412 | -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi;libunwind" |
| 413 | |
| 414 | check-cxx-cxxabi |
| 415 | ;; |
Louis Dionne | 61b63fd | 2021-03-16 11:57:42 -0700 | [diff] [blame] | 416 | runtimes-build) |
| 417 | export CC=clang |
| 418 | export CXX=clang++ |
| 419 | |
| 420 | clean |
| 421 | |
| 422 | echo "--- Generating CMake" |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 423 | ${CMAKE} \ |
| 424 | -S "${MONOREPO_ROOT}/llvm" \ |
Louis Dionne | 61b63fd | 2021-03-16 11:57:42 -0700 | [diff] [blame] | 425 | -B "${BUILD_DIR}" \ |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 426 | -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \ |
Louis Dionne | 61b63fd | 2021-03-16 11:57:42 -0700 | [diff] [blame] | 427 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 428 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
| 429 | -DLLVM_ENABLE_PROJECTS="clang" \ |
| 430 | -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \ |
Petr Hosek | 7134ad6 | 2021-04-27 22:31:36 -0700 | [diff] [blame] | 431 | -DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux-gnu" |
Louis Dionne | 61b63fd | 2021-03-16 11:57:42 -0700 | [diff] [blame] | 432 | |
| 433 | echo "+++ Running the libc++ and libc++abi tests" |
| 434 | ${NINJA} -C "${BUILD_DIR}" check-runtimes |
| 435 | |
| 436 | echo "--- Installing libc++ and libc++abi to a fake location" |
| 437 | ${NINJA} -C "${BUILD_DIR}" install-cxx install-cxxabi |
| 438 | ;; |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 439 | legacy-standalone) |
| 440 | export CC=clang |
| 441 | export CXX=clang++ |
| 442 | |
Louis Dionne | bb7be75 | 2020-11-05 19:02:32 -0500 | [diff] [blame] | 443 | clean |
| 444 | |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 445 | echo "--- Generating CMake" |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 446 | ${CMAKE} \ |
| 447 | -S "${MONOREPO_ROOT}/libcxx" \ |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 448 | -B "${BUILD_DIR}/libcxx" \ |
Louis Dionne | 7a8d536 | 2021-03-04 16:01:36 -0500 | [diff] [blame] | 449 | -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \ |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 450 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 451 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
| 452 | -DLLVM_PATH="${MONOREPO_ROOT}/llvm" \ |
| 453 | -DLIBCXX_CXX_ABI=libcxxabi \ |
| 454 | -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${MONOREPO_ROOT}/libcxxabi/include" \ |
| 455 | -DLIBCXX_CXX_ABI_LIBRARY_PATH="${BUILD_DIR}/libcxxabi/lib" |
| 456 | |
Louis Dionne | 6f96e99 | 2021-05-07 13:14:57 -0400 | [diff] [blame^] | 457 | ${CMAKE} \ |
| 458 | -S "${MONOREPO_ROOT}/libcxxabi" \ |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 459 | -B "${BUILD_DIR}/libcxxabi" \ |
Louis Dionne | 7a8d536 | 2021-03-04 16:01:36 -0500 | [diff] [blame] | 460 | -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \ |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 461 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 462 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ |
| 463 | -DLLVM_PATH="${MONOREPO_ROOT}/llvm" \ |
| 464 | -DLIBCXXABI_LIBCXX_PATH="${MONOREPO_ROOT}/libcxx" \ |
Louis Dionne | 94870d8 | 2020-06-26 12:08:59 -0400 | [diff] [blame] | 465 | -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}/libcxx/include/c++/v1" \ |
Louis Dionne | 5be8b09 | 2020-10-26 14:25:49 -0400 | [diff] [blame] | 466 | -DLIBCXXABI_LIBCXX_LIBRARY_PATH="${BUILD_DIR}/libcxx/lib" |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 467 | |
Louis Dionne | 94870d8 | 2020-06-26 12:08:59 -0400 | [diff] [blame] | 468 | echo "+++ Generating libc++ headers" |
| 469 | ${NINJA} -vC "${BUILD_DIR}/libcxx" generate-cxx-headers |
| 470 | |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 471 | echo "+++ Building libc++abi" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 472 | ${NINJA} -vC "${BUILD_DIR}/libcxxabi" cxxabi |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 473 | |
| 474 | echo "+++ Building libc++" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 475 | ${NINJA} -vC "${BUILD_DIR}/libcxx" cxx |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 476 | |
| 477 | echo "+++ Running the libc++ tests" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 478 | ${NINJA} -vC "${BUILD_DIR}/libcxx" check-cxx |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 479 | |
| 480 | echo "+++ Running the libc++abi tests" |
Louis Dionne | 1fcb041 | 2021-03-19 16:26:15 -0700 | [diff] [blame] | 481 | ${NINJA} -vC "${BUILD_DIR}/libcxxabi" check-cxxabi |
Louis Dionne | 435c36b | 2020-10-23 16:27:41 -0400 | [diff] [blame] | 482 | ;; |
David Spickett | 77471a1 | 2021-02-08 10:43:21 +0000 | [diff] [blame] | 483 | aarch64) |
| 484 | clean |
| 485 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake" |
| 486 | check-cxx-cxxabi |
| 487 | ;; |
| 488 | aarch64-noexceptions) |
| 489 | clean |
| 490 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake" \ |
| 491 | -DLIBCXX_ENABLE_EXCEPTIONS=OFF \ |
| 492 | -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF |
| 493 | check-cxx-cxxabi |
| 494 | ;; |
David Spickett | a16b886 | 2021-03-02 15:07:19 +0000 | [diff] [blame] | 495 | # Aka Armv8 32 bit |
| 496 | armv8) |
| 497 | clean |
David Spickett | 7cc0a7f | 2021-03-17 11:09:41 +0000 | [diff] [blame] | 498 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv8Arm.cmake" |
David Spickett | a16b886 | 2021-03-02 15:07:19 +0000 | [diff] [blame] | 499 | check-cxx-cxxabi |
| 500 | ;; |
| 501 | armv8-noexceptions) |
| 502 | clean |
David Spickett | 7cc0a7f | 2021-03-17 11:09:41 +0000 | [diff] [blame] | 503 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv8Thumb-noexceptions.cmake" |
David Spickett | a16b886 | 2021-03-02 15:07:19 +0000 | [diff] [blame] | 504 | check-cxx-cxxabi |
| 505 | ;; |
| 506 | # Armv7 32 bit. One building Arm only one Thumb only code. |
| 507 | armv7) |
| 508 | clean |
David Spickett | 7cc0a7f | 2021-03-17 11:09:41 +0000 | [diff] [blame] | 509 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv7Arm.cmake" |
David Spickett | a16b886 | 2021-03-02 15:07:19 +0000 | [diff] [blame] | 510 | check-cxx-cxxabi |
| 511 | ;; |
| 512 | armv7-noexceptions) |
| 513 | clean |
David Spickett | 7cc0a7f | 2021-03-17 11:09:41 +0000 | [diff] [blame] | 514 | generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv7Thumb-noexceptions.cmake" |
David Spickett | a16b886 | 2021-03-02 15:07:19 +0000 | [diff] [blame] | 515 | check-cxx-cxxabi |
| 516 | ;; |
Martin Storsjö | 47cd346 | 2021-04-06 00:17:30 +0300 | [diff] [blame] | 517 | windows-dll) |
Martin Storsjö | 2ffae01 | 2021-03-17 12:10:42 +0200 | [diff] [blame] | 518 | clean |
Martin Storsjö | 2ffae01 | 2021-03-17 12:10:42 +0200 | [diff] [blame] | 519 | # TODO: Currently, building with the experimental library breaks running |
| 520 | # tests (the test linking look for the c++experimental library with the |
| 521 | # wrong name, and the statically linked c++experimental can't be linked |
| 522 | # correctly when libc++ visibility attributes indicate dllimport linkage |
| 523 | # anyway), thus just disable the experimental library. Remove this |
| 524 | # setting when cmake and the test driver does the right thing automatically. |
Martin Storsjö | 47cd346 | 2021-04-06 00:17:30 +0300 | [diff] [blame] | 525 | generate-cmake-libcxx-win -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF |
| 526 | echo "+++ Running the libc++ tests" |
| 527 | ${NINJA} -vC "${BUILD_DIR}" check-cxx |
| 528 | ;; |
| 529 | windows-static) |
| 530 | clean |
| 531 | generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF |
Martin Storsjö | 2ffae01 | 2021-03-17 12:10:42 +0200 | [diff] [blame] | 532 | echo "+++ Running the libc++ tests" |
| 533 | ${NINJA} -vC "${BUILD_DIR}" check-cxx |
| 534 | ;; |
Louis Dionne | ce55605 | 2020-09-23 09:20:03 -0400 | [diff] [blame] | 535 | *) |
| 536 | echo "${BUILDER} is not a known configuration" |
| 537 | exit 1 |
| 538 | ;; |
| 539 | esac |