Skip to content

Commit 115fc6a

Browse files
committed
Cleanups
1 parent a81903a commit 115fc6a

File tree

5 files changed

+27
-129
lines changed

5 files changed

+27
-129
lines changed

.github/workflows/premerge.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
premerge-checks-linux:
2727
name: Build and Test Linux${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && ' AArch64') || '' }}
2828
if: >-
29-
false && github.repository_owner == 'llvm' &&
29+
github.repository_owner == 'llvm' &&
3030
(github.event_name != 'pull_request' || github.event.action != 'closed')
3131
strategy:
3232
fail-fast: false
@@ -120,7 +120,7 @@ jobs:
120120
premerge-checks-windows:
121121
name: Build and Test Windows
122122
if: >-
123-
false && github.repository_owner == 'llvm' &&
123+
github.repository_owner == 'llvm' &&
124124
(github.event_name != 'pull_request' || github.event.action != 'closed')
125125
runs-on: llvm-premerge-windows-2022-runners
126126
defaults:

.github/workflows/release-binaries-all.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ jobs:
8888
# We use ubuntu-22.04 rather than the latest version to make the built
8989
# binaries more portable (eg functional aginast older glibc).
9090
runs-on:
91+
- ubuntu-22.04
92+
- ubuntu-22.04-arm
93+
- macos-14
9194
- windows-2022
9295

9396
uses: ./.github/workflows/release-binaries.yml

.github/workflows/release-binaries.yml

Lines changed: 20 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,6 @@ jobs:
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

clang/cmake/caches/Release.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ endfunction()
3030
#
3131
# cmake -D LLVM_RELEASE_ENABLE_PGO=ON -C Release.cmake
3232

33-
set(LLVM_RELEASE_LIBXML2_PREFIX OFF CACHE STRING "")
34-
3533
if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
3634
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra")
3735
#set_instrument_and_final_stage_var(LLVM_TARGETS_TO_BUILD "AArch64;ARM;X86;BPF;WebAssembly;RISCV;NVPTX" STRING)
@@ -46,6 +44,8 @@ if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
4644
set_instrument_and_final_stage_var(LLVM_ENABLE_RPMALLOC "ON" BOOL)
4745
set_final_stage_var(BUILD_LLVM_C_DYLIB "ON" STRING)
4846
set_final_stage_var(LLVM_INSTALL_TOOLCHAIN_ONLY "ON" BOOL)
47+
# Disable lldb tests on Windows since some aren't working.
48+
set_final_stage_var(LLDB_INCLUDE_TESTS "OFF" BOOL)
4949
else()
5050
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra;polly;mlir")
5151
endif()

llvm/cmake/config-ix.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ if(LLVM_ENABLE_ZSTD)
210210
endif()
211211

212212
if(LLVM_ENABLE_LIBXML2)
213-
message("LIBRARIES BEFORE: ${LIBXML2_LIBRARIES} WIN32: ${WIN32}")
214213
if(LLVM_ENABLE_LIBXML2 STREQUAL FORCE_ON)
215214
find_package(LibXml2 REQUIRED)
216215
elseif(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
@@ -219,8 +218,6 @@ if(LLVM_ENABLE_LIBXML2)
219218
if(LibXml2_FOUND)
220219
# Check if libxml2 we found is usable; for example, we may have found a 32-bit
221220
# library on a 64-bit system which would result in a link-time failure.
222-
message("LIBRARIES: ${LIBXML2_LIBRARIES}")
223-
message("DEFINITIONS: ${LIBXML2_DEFINITIONS}")
224221
cmake_push_check_state()
225222
list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBXML2_INCLUDE_DIRS})
226223
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBXML2_LIBRARIES})

0 commit comments

Comments
 (0)