Skip to content

Commit 4474932

Browse files
committed
Use vpckg
1 parent 41d13fb commit 4474932

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.github/workflows/release-binaries.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ jobs:
176176
# at Microsoft.Tools.WindowsInstallerXml.CabinetBuilder.CreateCabinet(CabinetWorkItem cabinetWorkItem)
177177
#libxml2_prefix="/c/vcpkg/packages/libxml2_x64-windows-static/"
178178
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
179-
#target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_LIBXML2_PREFIX=/s/libxml-install/"
180-
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_LIBXML2_PREFIX=/c/vcpkg/packages/libxml2_x64-windows-static/"
179+
# libxml2 config
180+
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DBOOTSTRAP_BOOTSTRAP_CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON"
181+
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_LibXml2_DIR=/c/vcpkg/packages/libxml2_x64-windows-static/share/libxml2/ -DBOOTSTRAP_BOOTSTRAP_LibXml2_DIR=/c/vcpkg/packages/libxml2_x64-windows-static/share/libxml2/"
181182
fi
182183
183184
echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
@@ -284,6 +285,8 @@ jobs:
284285
VCPKG_CMAKE_CONFIGURE_OPTIONS: -DLIBXML2_WITH_ZLIB=OFF -DLIBXML2_WITH_ICONV=OFF
285286
VCPKG_ENV_PASSTHROUGH: VCPKG_CMAKE_CONFIGURE_OPTIONS
286287
run: |
288+
# Specify [core] to disable extra features so we don't add extra dll dependencies.
289+
# Even with [core] there is still one dll dependency which is bcrypt.dll.
287290
vcpkg install libxml2[core]:x64-windows-static
288291
#find / -iname 'libxml*.lib'
289292
ls -l /c/vcpkg/packages/libxml2_x64-windows-static/lib/
@@ -308,9 +311,6 @@ jobs:
308311
# -DLIBXML2_DEFINITIONS=-DLIBXML_STATIC \
309312
cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
310313
${{ needs.prepare.outputs.target-cmake-flags }} \
311-
-DLLVM_ENABLE_LIBXML2=FORCE_ON \
312-
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
313-
-DLibXml2_DIR=/c/vcpkg/packages/libxml2_x64-windows-static/share/libxml2/ \
314314
-C clang/cmake/caches/Release.cmake \
315315
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
316316

clang/cmake/caches/Release.cmake

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,8 @@ if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
3838
set_instrument_and_final_stage_var(Python3_FIND_REGISTRY "NEVER" STRING)
3939
set_instrument_and_final_stage_var(LLDB_RELOCATABLE_PYTHON "1" STRING)
4040
set_instrument_and_final_stage_var(LLDB_EMBED_PYTHON_HOME "OFF" BOOL)
41-
if (LLVM_RELEASE_LIBXML2_PREFIX)
42-
# Enable libxml2 with static linking. This is necessary for llvm-mt.
43-
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBXML2 "FORCE_ON" STRING)
44-
set_instrument_and_final_stage_var(LIBXML2_LIBRARIES "${LLVM_RELEASE_LIBXML2_PREFIX}/lib/libxml2s.lib" STRING)
45-
set_instrument_and_final_stage_var(LIBXML2_INCLUDE_DIR "${LLVM_RELEASE_LIBXML2_PREFIX}/include/libxml2" STRING)
46-
set_instrument_and_final_stage_var(LIBXML2_DEFINITIONS "-DLIBXML_STATIC" STRING)
47-
endif()
41+
# Enable libxml2. This is necessary for llvm-mt.
42+
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBXML2 "FORCE_ON" STRING)
4843
set_instrument_and_final_stage_var(LLDB_ENABLE_LIBXML2 "OFF" BOOL)
4944
set_instrument_and_final_stage_var(CLANG_ENABLE_LIBXML2 "OFF" BOOL)
5045
set_instrument_and_final_stage_var(LLVM_ENABLE_RPMALLOC "ON" BOOL)

0 commit comments

Comments
 (0)