[libcxx-commits] [PATCH] D101565: [libcxx] [ci] Add a Windows CI configuration for a statically linked libc++

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 29 13:04:42 PDT 2021


mstorsjo created this revision.
Herald added a subscriber: arichardson.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.

On Windows, static vs DLL linking affects details in quite a few
cases, so it's good to have coverage for both cases.

Testing with static linking also increases coverage for a number of
cases and individual checks that have had to be waived for the DLL
case, and allows testing libc++experimental, increasing the number
of test cases actually executed by 180 (176 new tests from
libc++experimental and 4 ones that are XFAIL windows-dll).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101565

Files:
  libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp
  libcxx/utils/ci/buildkite-pipeline.yml
  libcxx/utils/ci/run-buildbot


Index: libcxx/utils/ci/run-buildbot
===================================================================
--- libcxx/utils/ci/run-buildbot
+++ libcxx/utils/ci/run-buildbot
@@ -473,7 +473,7 @@
     generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv7Thumb-noexceptions.cmake"
     check-cxx-cxxabi
 ;;
-generic-win)
+generic-win*)
     clean
     # TODO: Clang-cl in MSVC configurations don't have access to compiler_rt
     # builtins helpers for int128 division. See
@@ -490,6 +490,13 @@
     # anyway), thus just disable the experimental library. Remove this
     # setting when cmake and the test driver does the right thing automatically.
 
+    CMAKE_FLAGS=""
+    if [ "${BUILDER}" = "generic-win-static" ]; then
+        CMAKE_FLAGS="$CMAKE_FLAGS -DLIBCXX_ENABLE_SHARED=NO"
+    else
+        CMAKE_FLAGS="$CMAKE_FLAGS -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO"
+    fi
+
     echo "--- Generating CMake"
     cmake -S "${MONOREPO_ROOT}/libcxx" \
           -B "${BUILD_DIR}" \
@@ -498,10 +505,10 @@
           -DCMAKE_C_COMPILER=clang-cl \
           -DCMAKE_CXX_COMPILER=clang-cl \
           -DLLVM_LIT_ARGS="-sv --show-unsupported --xunit-xml-output test-results.xml" \
-          -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO \
           -DLIBCXX_ENABLE_FILESYSTEM=YES \
           -DCMAKE_CXX_FLAGS="-D_LIBCPP_HAS_NO_INT128" \
-          -DLIBCXX_TEST_COMPILER_FLAGS="-D_LIBCPP_HAS_NO_INT128"
+          -DLIBCXX_TEST_COMPILER_FLAGS="-D_LIBCPP_HAS_NO_INT128" \
+          ${CMAKE_FLAGS}
     echo "+++ Running the libc++ tests"
     ${NINJA} -vC "${BUILD_DIR}" check-cxx
 ;;
Index: libcxx/utils/ci/buildkite-pipeline.yml
===================================================================
--- libcxx/utils/ci/buildkite-pipeline.yml
+++ libcxx/utils/ci/buildkite-pipeline.yml
@@ -317,7 +317,18 @@
         - exit_status: -1  # Agent was lost
           limit: 2
 
-  - label: "Windows"
+  - label: "Windows (DLL)"
+    command: "bash libcxx/utils/ci/run-buildbot generic-win"
+    artifact_paths:
+      - "**/test-results.xml"
+    agents:
+      queue: "windows"
+    retry:
+      automatic:
+        - exit_status: -1  # Agent was lost
+          limit: 2
+
+  - label: "Windows (Static)"
     command: "bash libcxx/utils/ci/run-buildbot generic-win"
     artifact_paths:
       - "**/test-results.xml"
Index: libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp
===================================================================
--- libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp
+++ libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp
@@ -14,6 +14,8 @@
 
 // T* polymorphic_allocator<T>::deallocate(T*, size_t size)
 
+// XFAIL: LIBCXX-WINDOWS-FIXME
+
 int AssertCount = 0;
 
 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (void)::AssertCount++)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101565.341618.patch
Type: text/x-patch
Size: 2955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210429/f2ee7939/attachment.bin>


More information about the libcxx-commits mailing list