diff --git a/libcxx/cmake/caches/Generic-static.cmake b/libcxx/cmake/caches/Generic-static.cmake new file mode 100644 --- /dev/null +++ b/libcxx/cmake/caches/Generic-static.cmake @@ -0,0 +1,10 @@ +set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") +set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "") +set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "") + +# TODO: We should switch this to a from-sratch config with static libraries +# instead and get rid of these options. +set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "") +set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "") +set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "") +set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "") diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -111,6 +111,17 @@ - exit_status: -1 # Agent was lost limit: 2 + - label: "Static libraries" + command: "libcxx/utils/ci/run-buildbot generic-static" + artifact_paths: + - "**/test-results.xml" + agents: + queue: "libcxx-builders" + retry: + automatic: + - exit_status: -1 # Agent was lost + limit: 2 + - label: "GCC/C++20" command: "libcxx/utils/ci/run-buildbot generic-gcc" artifact_paths: diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -86,14 +86,14 @@ } function check-cxx-cxxabi() { + echo "--- Installing libc++ and libc++abi to a fake location" + ${NINJA} -vC "${BUILD_DIR}" install-cxx install-cxxabi + echo "+++ Running the libc++ tests" ${NINJA} -vC "${BUILD_DIR}" check-cxx echo "+++ Running the libc++abi tests" ${NINJA} -vC "${BUILD_DIR}" check-cxxabi - - echo "--- Installing libc++ and libc++abi to a fake location" - ${NINJA} -vC "${BUILD_DIR}" install-cxx install-cxxabi } # TODO: The goal is to test this against all configurations. We should also move @@ -183,6 +183,13 @@ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-noexceptions.cmake" check-cxx-cxxabi ;; +generic-static) + export CC=clang + export CXX=clang++ + clean + generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-static.cmake" + check-cxx-cxxabi +;; generic-32bit) export CC=clang export CXX=clang++ diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -124,7 +124,7 @@ self.configure_obj_root() self.cxx_stdlib_under_test = self.get_lit_conf('cxx_stdlib_under_test', 'libc++') self.cxx_library_root = self.get_lit_conf('cxx_library_root', self.libcxx_obj_root) - self.abi_library_root = self.get_lit_conf('abi_library_root', None) + self.abi_library_root = self.get_lit_conf('abi_library_root', self.cxx_library_root) self.cxx_runtime_root = self.get_lit_conf('cxx_runtime_root', self.cxx_library_root) self.abi_runtime_root = self.get_lit_conf('abi_runtime_root', self.abi_library_root) self.configure_compile_flags()