[PATCH] D158995: [clang] Add a Windows build in the Clang pre-commit CI

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 28 12:40:14 PDT 2023


ldionne updated this revision to Diff 554015.
ldionne added a comment.

Set VC variables


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158995/new/

https://reviews.llvm.org/D158995

Files:
  clang/utils/ci/buildkite-pipeline.yml
  clang/utils/ci/run-buildbot


Index: clang/utils/ci/run-buildbot
===================================================================
--- clang/utils/ci/run-buildbot
+++ clang/utils/ci/run-buildbot
@@ -95,6 +95,24 @@
 
     ninja -C ${BUILD_DIR} check-clang
 ;;
+build-clang-windows)
+    cmake -S llvm -B ${BUILD_DIR} -G Ninja                                      \
+        -D CMAKE_C_COMPILER_LAUNCHER=sccache                                    \
+        -D CMAKE_CXX_COMPILER_LAUNCHER=sccache                                  \
+        -D CMAKE_BUILD_TYPE=Release                                             \
+        -D CMAKE_INSTALL_PREFIX=install-windows                                 \
+        -D LLVM_ENABLE_PROJECTS="clang;compiler-rt"                             \
+        -D LLVM_ENABLE_ASSERTIONS=ON                                            \
+        -D LLVM_BUILD_EXAMPLES=ON                                               \
+        -D COMPILER_RT_BUILD_LIBFUZZER=OFF                                      \
+        -D COMPILER_RT_BUILD_ORC=OFF
+
+    ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers
+    tar -cJvf install-windows.tar.xz install-windows/
+    buildkite-agent artifact upload --debug install-windows.tar.xz
+
+    ninja -C ${BUILD_DIR} check-clang
+;;
 generic-cxx03)
     buildkite-agent artifact download install.tar.xz .
     tar -xvf install.tar.xz
Index: clang/utils/ci/buildkite-pipeline.yml
===================================================================
--- clang/utils/ci/buildkite-pipeline.yml
+++ clang/utils/ci/buildkite-pipeline.yml
@@ -31,7 +31,7 @@
 
   - wait
 
-  - label: "Building and testing clang"
+  - label: "Building and testing clang (Linux)"
     commands:
       - "clang/utils/ci/run-buildbot build-clang"
     agents:
@@ -42,6 +42,18 @@
           limit: 2
     timeout_in_minutes: 120
 
+  - label: "Building and testing clang (Windows)"
+    commands:
+      - "C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64"
+      - "bash clang/utils/ci/run-buildbot build-clang-windows"
+    agents:
+      queue: "windows"
+    retry:
+      automatic:
+        - exit_status: -1  # Agent was lost
+          limit: 2
+    timeout_in_minutes: 120
+
   - wait
 
   - label: "Running libc++ test suite in C++03"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158995.554015.patch
Type: text/x-patch
Size: 2288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230828/a6d558d1/attachment.bin>


More information about the cfe-commits mailing list