Skip to content

Commit eb27be9

Browse files
committed
[clang] Add a Windows build in the Clang pre-commit CI
This patch adds a CI job for Clang on Windows that is separate from the monolithic job that gets added automatically via the Phabricator integration with Buildkite. This way, we will retain the Windows testing for Clang when we move to GitHub Pull Requests. Differential Revision: https://reviews.llvm.org/D158995
1 parent 0a32a99 commit eb27be9

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

clang/utils/ci/buildkite-pipeline.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ steps:
3131

3232
- wait
3333

34-
- label: "Building and testing clang"
34+
- label: "Building and testing clang (Linux)"
3535
commands:
3636
- "clang/utils/ci/run-buildbot build-clang"
3737
agents:
@@ -42,6 +42,18 @@ steps:
4242
limit: 2
4343
timeout_in_minutes: 120
4444

45+
- label: "Building and testing clang (Windows)"
46+
commands:
47+
- "C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64"
48+
- "bash clang/utils/ci/run-buildbot build-clang-windows"
49+
agents:
50+
queue: "windows"
51+
retry:
52+
automatic:
53+
- exit_status: -1 # Agent was lost
54+
limit: 2
55+
timeout_in_minutes: 120
56+
4557
- wait
4658

4759
- label: "Running libc++ test suite in C++03"

clang/utils/ci/run-buildbot

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,21 @@ build-clang)
9595

9696
ninja -C ${BUILD_DIR} check-clang
9797
;;
98+
build-clang-windows)
99+
cmake -S llvm -B ${BUILD_DIR} -G Ninja \
100+
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
101+
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
102+
-D CMAKE_BUILD_TYPE=Release \
103+
-D CMAKE_INSTALL_PREFIX=install-windows \
104+
-D LLVM_ENABLE_PROJECTS="clang;compiler-rt" \
105+
-D LLVM_ENABLE_ASSERTIONS=ON \
106+
-D LLVM_BUILD_EXAMPLES=ON \
107+
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
108+
-D COMPILER_RT_BUILD_ORC=OFF
109+
110+
ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers
111+
ninja -C ${BUILD_DIR} check-clang
112+
;;
98113
generic-cxx03)
99114
buildkite-agent artifact download install.tar.xz .
100115
tar -xvf install.tar.xz

0 commit comments

Comments
 (0)