7070 - uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
7171 with :
7272 python-version : ' 3.13'
73- - name : Install libxml2
74- if : false
75- shell : bash
76- env :
77- VCPKG_BUILD_TYPE : release
78- VCPKG_CMAKE_CONFIGURE_OPTIONS : -DBUILD_SHARED_LIBS=OFF
79- VCPKG_ENV_PASSTHROUGH : 1
80- run : |
81- vcpkg update
82- mkdir custom-triplets
83- cp /c/vcpkg/triplets/x64-windows-static.cmake custom-triplets/x64-windows-static-release.cmake
84- cat custom-triplets/x64-windows-static-release.cmake
85- echo "set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DBUILD_SHARED_LIBS=OFF)" >> custom-triplets/x64-windows-static-release.cmake
86- echo "set(VCPKG_BUILD_TYPE release)" >> custom-triplets/x64-windows-static-release.cmake
87- echo "set(BUILD_SHARED_LIBS OFF)" >> custom-triplets/x64-windows-static-release.cmake
88- vcpkg --debug install libxml2:x64-windows-static-release --overlay-triplets=custom-triplets
89- find /c/vcpkg -iname 'libxml*.lib'
90-
91- - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
92- if : false
93- with :
94- name : libxml2
95- path : |
96- C:\vcpkg\installed\x64-windows-static-release\lib\libxml2.lib
9773
9874 - name : Checkout LLVM
9975 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -172,7 +148,6 @@ jobs:
172148 # at Microsoft.Tools.WindowsInstallerXml.Cab.Interop.NativeMethods.CreateCabFinish(IntPtr contextHandle, IntPtr newCabNamesCallBackAddress)
173149 # at Microsoft.Tools.WindowsInstallerXml.Cab.WixCreateCab.Complete(IntPtr newCabNamesCallBackAddress)
174150 # at Microsoft.Tools.WindowsInstallerXml.CabinetBuilder.CreateCabinet(CabinetWorkItem cabinetWorkItem)
175- #libxml2_prefix="/c/vcpkg/packages/libxml2_x64-windows-static/"
176151 target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
177152 # libxml2 config
178153 target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DBOOTSTRAP_BOOTSTRAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON"
@@ -189,9 +164,6 @@ jobs:
189164 version_suffix=".$rc_version"
190165 fi
191166 target_cmake_flags="$target_cmake_flags -DLLVM_VERSION_SUFFIX=$version_suffix"
192-
193- # Disable lldb tests on Windows
194- target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_LLDB_INCLUDE_TESTS=OFF"
195167 fi
196168
197169 echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
@@ -215,28 +187,40 @@ jobs:
215187 esac
216188 echo "build-runs-on=$build_runs_on" >> $GITHUB_OUTPUT
217189 echo "test-runs-on=$test_runs_on" >> $GITHUB_OUTPUT
218-
190+
219191
220192 build-release-package :
221193 name : " Build Release Package"
222194 needs : prepare
223195 if : github.repository_owner == 'llvm'
224196 runs-on : ${{ needs.prepare.outputs.build-runs-on }}
225197 steps :
226-
227- # See https://llvm.org/docs/GettingStarted.html#id4
228- - name : Disable autocrlf for git on Windows
198+ - name : Windows config
229199 if : runner.os == 'Windows'
230200 run : |
201+ # In order to avoid some errors with long paths names, we need to shorten
202+ # the path names for the build.
203+ subst S: ${{ github.workspace }}
204+
205+ # Disable autocrlf See https://llvm.org/docs/GettingStarted.html#id4
231206 git config --global core.autocrlf false
232207
233- # Setup python.
208+ # Install Wix for creating the installer.
209+ dotnet tool install --global wix
210+
211+ # Install libxml2
212+ # Specify [core] to disable extra features so we don't add extra dll dependencies.
213+ # Even with [core] there is still one dll dependency which is bcrypt.dll.
214+ vcpkg install libxml2[core]:x64-windows-static
215+
216+ # Setup python to ensure consistency in the python version used for
217+ # all steps of this job.
234218 - name : Setup Python
235219 id : setup-python
236220 uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
237221 with :
238222 python-version : ' 3.13'
239-
223+ pip-install : packaging psutil
240224
241225 - name : Checkout LLVM
242226 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -252,13 +236,6 @@ jobs:
252236 with :
253237 arch : amd64
254238
255- # In order to avoid some errors with long paths names, we need to shorten
256- # the path names for the build.
257- - name : Shorten paths on Windows
258- if : startsWith(runner.os, 'Windows')
259- run : |
260- subst S: ${{ github.workspace }}
261-
262239 - name : Set Build Prefix
263240 id : setup-stage
264241 shell : bash
@@ -272,94 +249,17 @@ jobs:
272249 fi
273250 echo "build-prefix=$build_prefix" >> $GITHUB_OUTPUT
274251
275- # We will use Wix to generate the installer on Windows, because this
276- # reportedly works better with larger installers, though, I haven't actually
277- # seen an installer > 2GB, which is the limit for default installer
278- # generator.
279- - name : Install Wix
280- if : runner.os == 'Windows'
281- run : |
282- dotnet tool install --global wix
283-
284- - name : Install libxml2 for Windows
285- if : runner.os == 'Windows' && false
286- run : |
287- # Build libxml2 for windows
288- curl -O https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.9.12/libxml2-v2.9.12.tar.gz
289- tar zxf libxml2-v2.9.12.tar.gz
290-
291- cmake -S libxml2-v2.9.12 -G Ninja -B libxml-build `
292- -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=libxml-install `
293- -DBUILD_SHARED_LIBS=OFF -DLIBXML2_WITH_C14N=OFF -DLIBXML2_WITH_CATALOG=OFF `
294- -DLIBXML2_WITH_DEBUG=OFF -DLIBXML2_WITH_DOCB=OFF -DLIBXML2_WITH_FTP=OFF `
295- -DLIBXML2_WITH_HTML=OFF -DLIBXML2_WITH_HTTP=OFF -DLIBXML2_WITH_ICONV=OFF `
296- -DLIBXML2_WITH_ICU=OFF -DLIBXML2_WITH_ISO8859X=OFF -DLIBXML2_WITH_LEGACY=OFF `
297- -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_MEM_DEBUG=OFF -DLIBXML2_WITH_MODULES=OFF `
298- -DLIBXML2_WITH_OUTPUT=ON -DLIBXML2_WITH_PATTERN=OFF -DLIBXML2_WITH_PROGRAMS=OFF `
299- -DLIBXML2_WITH_PUSH=OFF -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_READER=OFF `
300- -DLIBXML2_WITH_REGEXPS=OFF -DLIBXML2_WITH_RUN_DEBUG=OFF -DLIBXML2_WITH_SAX1=OFF `
301- -DLIBXML2_WITH_SCHEMAS=OFF -DLIBXML2_WITH_SCHEMATRON=OFF -DLIBXML2_WITH_TESTS=OFF `
302- -DLIBXML2_WITH_THREADS=ON -DLIBXML2_WITH_THREAD_ALLOC=OFF -DLIBXML2_WITH_TREE=ON `
303- -DLIBXML2_WITH_VALID=OFF -DLIBXML2_WITH_WRITER=OFF -DLIBXML2_WITH_XINCLUDE=OFF `
304- -DLIBXML2_WITH_XPATH=OFF -DLIBXML2_WITH_XPTR=OFF -DLIBXML2_WITH_ZLIB=OFF `
305- -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
306- ninja -v -C libxml-build install
307-
308- - name : Install libxml2
309- shell : bash
310- env :
311- VCPKG_BUILD_TYPE : release
312- VCPKG_CMAKE_CONFIGURE_OPTIONS : -DLIBXML2_WITH_ZLIB=OFF -DLIBXML2_WITH_ICONV=OFF
313- VCPKG_ENV_PASSTHROUGH : VCPKG_CMAKE_CONFIGURE_OPTIONS
314- run : |
315- # Specify [core] to disable extra features so we don't add extra dll dependencies.
316- # Even with [core] there is still one dll dependency which is bcrypt.dll.
317- vcpkg install libxml2[core]:x64-windows-static
318- #find / -iname 'libxml*.lib'
319- ls -l /c/vcpkg/packages/libxml2_x64-windows-static/lib/
320- find /c/vcpkg/ -iname '*.cmake'
321- find /c/vcpkg/ -iname '*cmake*'
322- cat /c/vcpkg/packages/libxml2_x64-windows-static/share/libxml2/libxml2-config.cmake
323- cat "/c/Program Files/CMake/share/cmake-3.31/Modules/FindLibXml2.cmake"
324-
325- - name : Install python dependencies
326- run : |
327- pip --python ${{ steps.setup-python.outputs.python-path }} install packaging psutil
328-
329252 - name : Configure
330253 id : build
331254 shell : bash
332- env :
333- LIBXML2_ROOT : /c/vcpkg/packages/libxml2_x64-windows-static/
334255 run : |
335- #ls -l /c/vcpkg/packages/libxml2_x64-windows-static/
336- #ls -l /c/vcpkg/packages/libxml2_x64-windows-static/lib/
337- #ls -l /c/vcpkg/packages/libxml2_x64-windows-static/include/
338- #ls -l /c/vcpkg/packages/libxml2_x64-windows-static/include/libxml2
339- #ls -l /c/vcpkg/packages/libxml2_x64-windows-static/include/libxml2/libxml
340256 # There were some issues on the ARM64 MacOS runners with trying to build x86 object,
341257 # so we need to set some extra cmake flags to disable this.
342- # -DLIBXML2_LIBRARIES=/c/vcpkg/packages/libxml2_x64-windows-static/lib/libxml2.lib \
343- # -DLIBXML2_INCLUDE_DIR=/c/vcpkg/packages/libxml2_x64-windows-static/include/libxml2 \
344- # -DLIBXML2_DEFINITIONS=-DLIBXML_STATIC \
345- #-DLibXml2_DIR=/c/vcpkg/packages/libxml2_x64-windows-static/share/libxml2/ \
346- cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
258+ cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
347259 ${{ needs.prepare.outputs.target-cmake-flags }} \
348- -DLLVM_ENABLE_LIBXML2=FORCE_ON \
349- -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
350260 -C clang/cmake/caches/Release.cmake \
351261 -DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
352262
353- - name : Save build
354- if : failure() && runner.os == 'Windows'
355- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
356- with :
357- name : build
358- # Due to path differences on Windows when running in bash vs running on node,
359- # we need to search for files in the current workspace.
360- path : |
361- build
362-
363263 - name : Build
364264 shell : bash
365265 env :
@@ -371,7 +271,7 @@ jobs:
371271 ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package
372272 release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
373273 mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
374-
274+
375275 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
376276 with :
377277 name : ${{ runner.os }}-${{ runner.arch }}-release-binary
@@ -395,8 +295,6 @@ jobs:
395295 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
396296 with :
397297 name : ${{ runner.os }}-${{ runner.arch }}-nsis-log
398- # Due to path differences on Windows when running in bash vs running on node,
399- # we need to search for files in the current workspace.
400298 path : |
401299 S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log
402300 S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/WIX/wix.log
0 commit comments