[LLVM] Bump to llvm 19.1.6 #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
concurrency: | |
group: build-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- llvmorg-* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build llvm on Windows | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
rtlib: ["MultiThreadedDLL"] | |
steps: | |
- name: Install dependency | |
uses: crazy-max/ghaction-chocolatey@v1 | |
with: | |
args: install --no-progress ninja vswhere 7zip.install | |
- name: Upgrade dependency | |
uses: crazy-max/ghaction-chocolatey@v1 | |
with: | |
args: upgrade --no-progress llvm | |
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 | |
with: | |
sdk-version: 26100 | |
- name: Checkout libxml2 | |
run: git clone --quiet --branch v2.13.5 --depth 1 https://gitlab.gnome.org/GNOME/libxml2.git | |
- name: Build libxml2 | |
run: | | |
$vsPath = (vswhere -latest -property installationPath) | |
Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") | |
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" | |
$Env:CC = "clang-cl" | |
$Env:CXX = "clang-cl" | |
$cmake_sys_ver = "10.0.26100.0" | |
$prefix = "$pwd\prefix" | |
cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLIBXML2_WITH_ICONV=OFF libxml2 | |
cmake --build build --target install | |
Remove-Item -Recurse build | |
- name: Checkout llvm | |
run: git clone --quiet --branch llvmorg-19.1.6 --depth 1 https://github.com/llvm/llvm-project.git | |
- name: Build llvm stage 1 | |
run: | | |
$vsPath = (vswhere -latest -property installationPath) | |
Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") | |
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" | |
$Env:CC = "clang-cl" | |
$Env:CXX = "clang-cl" | |
$cmake_sys_ver = "10.0.26100.0" | |
$prefix = "$pwd\prefix" | |
cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_LIBXML2=FORCE_ON -DLIBXML2_INCLUDE_DIR:PATH="$prefix\include\libxml2" -DLIBXML2_LIBRARY:FILEPATH="$prefix\lib\libxml2.lib" llvm-project\llvm | |
cmake --build build --target install | |
Remove-Item -Recurse -Force build | |
- name: Build llvm stage 2 | |
run: | | |
$vsPath = (vswhere -latest -property installationPath) | |
Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") | |
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" | |
$prefix = "$pwd\prefix" | |
$Env:CC = "$prefix\bin\clang-cl.exe" | |
$Env:CXX = "$prefix\bin\clang-cl.exe" | |
$cmake_sys_ver = "10.0.26100.0" | |
cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_LIBXML2=FORCE_ON -DLIBXML2_INCLUDE_DIR:PATH="$prefix\include\libxml2" -DLIBXML2_LIBRARY:FILEPATH="$prefix\lib\libxml2.lib" llvm-project\llvm | |
cmake --build build --target install | |
- name: Repack zip package | |
run: | | |
Rename-Item prefix LLVM-19.1.6-win64 | |
7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off LLVM-19.1.6-win64-${{ matrix.rtlib }}.zip LLVM-19.1.6-win64 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: llvm-${{ matrix.rtlib }} | |
path: LLVM-*.zip | |
retention-days: 14 | |
compression-level: 0 |