Skip to content

Commit c44c557

Browse files
committed
cleanups
1 parent fd54593 commit c44c557

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

.github/workflows/release-binaries.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,8 @@ jobs:
158158
# at Microsoft.Tools.WindowsInstallerXml.Cab.WixCreateCab.Complete(IntPtr newCabNamesCallBackAddress)
159159
# at Microsoft.Tools.WindowsInstallerXml.CabinetBuilder.CreateCabinet(CabinetWorkItem cabinetWorkItem)
160160
#libxml2_prefix="/c/vcpkg/packages/libxml2_x64-windows-static/"
161-
libxml2_prefix="/s/libxml-install/"
162161
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
163-
#target_cmake_flags="$target_cmake_flags -DCMAKE_PREFIX_PATH=$libxml2_prefix"
164-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_CMAKE_PREFIX_PATH=$libxml2_prefix"
165-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_CMAKE_PREFIX_PATH=$libxml2_prefix"
166-
# This is required to enable static linking
167-
target_cmake_flags="$target_cmake_flags -DLIBXML2_LIBRARIES=$libxml2_prefix/lib/libxml2s.lib"
168-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_LIBXML2_LIBRARIES=$libxml2_prefix/lib/libxml2s.lib"
169-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_LIBXML2_LIBRARIES=$libxml2_prefix/lib/libxml2s.lib"
170-
target_cmake_flags="$target_cmake_flags -DLIBXML2_INCLUDE_DIR=$libxml2_prefix/include/libxml2"
171-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_LIBXML2_INCLUDE_DIR=$libxml2_prefix/include/libxml2"
172-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_LIBXML2_INCLUDE_DIR=$libxml2_prefix/include/libxml2"
162+
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_LIBXML2_PREFIX=/s/libxml-install/"
173163
fi
174164
175165
echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
@@ -315,11 +305,15 @@ jobs:
315305
run: |
316306
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-check-all
317307
318-
- name: Dump logs
308+
- name: Save logs
319309
if: failure() && runner.os == 'Windows'
320-
run: |
321-
cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log
322-
# cat S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/WIX/wix.log
310+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
311+
with:
312+
name: ${{ runner.os }}-${{ runner.arch }}-nsis-log
313+
# Due to path differences on Windows when running in bash vs running on node,
314+
# we need to search for files in the current workspace.
315+
path: |
316+
S:/build/tools/clang/stage2-instrumented-bins/tools/clang/stage2-bins/_CPack_Packages/win64/NSIS/NSISOutput.log
323317
324318
upload-release-binaries:
325319
name: "Upload Release Binaries"

clang/cmake/caches/Release.cmake

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

33+
set(LLVM_RELEASE_LIBXML2_PREFIX OFF CACHE STRING "")ENABLE_PROJECTS ${DEFAULT_PROJECTS} CACHE STRING "")
34+
3335
if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
3436
set (DEFAULT_PROJECTS "clang;lld;lldb;clang-tools-extra")
3537
set_instrument_and_final_stage_var(LLVM_TARGETS_TO_BUILD "AArch64;ARM;X86;BPF;WebAssembly;RISCV;NVPTX" STRING)
3638
set_instrument_and_final_stage_var(Python3_FIND_REGISTRY "NEVER" STRING)
3739
set_instrument_and_final_stage_var(LLDB_RELOCATABLE_PYTHON "1" STRING)
3840
set_instrument_and_final_stage_var(LLDB_EMBED_PYTHON_HOME "OFF" BOOL)
39-
set_instrument_and_final_stage_var(LLVM_ENABLE_LIBXML2 "FORCE_ON" STRING)
40-
# This is required in order to statically link LIBXML2
41-
set_instrument_and_final_stage_var(LIBXML2_DEFINITIONS "-DLIBXML_STATIC" STRING)
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(LLVM_ENABLE_LIBXML2 "${LLVM_RELEASE_LIBXML2_PREFIX}/include/libxml2" STRING)
46+
set_instrument_and_final_stage_var(LIBXML2_DEFINITIONS "-DLIBXML_STATIC" STRING)
47+
endif()
4248
set_instrument_and_final_stage_var(LLDB_ENABLE_LIBXML2 "OFF" BOOL)
4349
set_instrument_and_final_stage_var(CLANG_ENABLE_LIBXML2 "OFF" BOOL)
4450
set_instrument_and_final_stage_var(LLVM_ENABLE_RPMALLOC "ON" BOOL)

0 commit comments

Comments
 (0)