Lines Matching +full:- +full:dcmake_install_prefix
3 set -ue
7 $(basename ${0}) [-h|--help] --libcxx-root <LIBCXX-ROOT> --libcxxabi-root <LIBCXXABI-ROOT> --std <S…
11 --libcxx-root Full path to the root of the libc++ repository to test.
12 --libcxxabi-root Full path to the root of the libc++abi repository to test.
13 --std Version of the C++ Standard to run the tests under (c++03, c++11, etc..).
14 --arch Architecture to build the tests for (32, 64).
15 …[--lit-args] Additional arguments to pass to lit (optional). If there are multiple arguments,…
16 …[--no-cleanup] Do not cleanup the temporary directory that was used for testing at the end. Thi…
17 [-h, --help] Print this help.
21 while [[ $# -gt 0 ]]; do
23 --libcxx-root)
25 if [[ ! -e "${LIBCXX_ROOT}" ]]; then
26 echo "--libcxx-root '${LIBCXX_ROOT}' is not a valid directory"
32 --libcxxabi-root)
34 if [[ ! -e "${LIBCXXABI_ROOT}" ]]; then
35 echo "--libcxxabi-root '${LIBCXXABI_ROOT}' is not a valid directory"
41 --std)
45 --arch)
49 --lit-args)
53 --no-cleanup)
57 -h|--help)
69 if [[ -z ${LIBCXX_ROOT+x} ]]; then echo "--libcxx-root is a required parameter"; usage; exit 1; fi
70 if [[ -z ${LIBCXXABI_ROOT+x} ]]; then echo "--libcxxabi-root is a required parameter"; usage; exit …
71 if [[ -z ${STD+x} ]]; then echo "--std is a required parameter"; usage; exit 1; fi
72 if [[ -z ${ARCH+x} ]]; then echo "--arch is a required parameter"; usage; exit 1; fi
73 if [[ -z ${ADDITIONAL_LIT_ARGS+x} ]]; then ADDITIONAL_LIT_ARGS=""; fi
76 TEMP_DIR="$(mktemp -d)"
79 if [[ -z ${NO_CLEANUP+x} ]]; then
81 rm -rf "${TEMP_DIR}"
90 LIBCXX_BUILD_DIR="${TEMP_DIR}/libcxx-build"
91 LIBCXX_INSTALL_DIR="${TEMP_DIR}/libcxx-install"
92 LIBCXXABI_BUILD_DIR="${TEMP_DIR}/libcxxabi-build"
93 LIBCXXABI_INSTALL_DIR="${TEMP_DIR}/libcxxabi-install"
95 LLVM_TARBALL_URL="https://github.com/llvm-mirror/llvm/archive/master.tar.gz"
96 export CC="$(xcrun --find clang)"
97 export CXX="$(xcrun --find clang++)"
102 curl -L "${LLVM_TARBALL_URL}" | tar -xz --strip-components=1 -C "${LLVM_ROOT}"
107 LIT_FLAGS="-sv --param=std=${STD} ${ADDITIONAL_LIT_ARGS}"
109 LIT_FLAGS+=" --param=enable_32bit=true"
115 mkdir -p "${LIBCXX_BUILD_DIR}"
117 xcrun cmake "${LIBCXX_ROOT}" -GNinja \
118 -DLLVM_PATH="${LLVM_ROOT}" \
119 -DCMAKE_INSTALL_PREFIX="${LIBCXX_INSTALL_DIR}" \
120 -DLLVM_LIT_ARGS="${LIT_FLAGS}" \
121 -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" # Build a universal dylib
127 mkdir -p "${LIBCXXABI_BUILD_DIR}"
129 xcrun cmake "${LIBCXXABI_ROOT}" -GNinja \
130 -DLIBCXXABI_LIBCXX_PATH="${LIBCXX_ROOT}" \
131 -DLLVM_PATH="${LLVM_ROOT}" \
132 -DCMAKE_INSTALL_PREFIX="${LIBCXXABI_INSTALL_DIR}" \
133 -DLLVM_LIT_ARGS="${LIT_FLAGS}" \
134 -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" # Build a universal dylib
140 ninja -C "${LIBCXX_BUILD_DIR}" install-cxx
141 ninja -C "${LIBCXXABI_BUILD_DIR}" install-cxxabi
146 # TODO: We should run check-cxx-abilist too
147 ninja -C "${LIBCXX_BUILD_DIR}" check-cxx
152 ninja -C "${LIBCXXABI_BUILD_DIR}" check-cxxabi