File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8181 if : matrix.os == 'windows-latest'
8282 run : choco install ninja -y
8383
84+ - name : Debug LLVM Configuration (Windows)
85+ if : matrix.os == 'windows-latest'
86+ shell : pwsh
87+ run : |
88+ Write-Host "LLVM_DIR: $env:LLVM_DIR"
89+ Write-Host "LLVM_ROOT: $env:LLVM_ROOT"
90+ Write-Host "Checking if LLVMConfig.cmake exists..."
91+ if (Test-Path "$env:LLVM_DIR/LLVMConfig.cmake") {
92+ Write-Host "✓ Found LLVMConfig.cmake at $env:LLVM_DIR/LLVMConfig.cmake"
93+ } else {
94+ Write-Host "✗ LLVMConfig.cmake not found at $env:LLVM_DIR"
95+ Write-Host "Searching for LLVMConfig.cmake..."
96+ Get-ChildItem -Path "$env:LLVM_ROOT" -Filter "LLVMConfig.cmake" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 5 | ForEach-Object { Write-Host $_.FullName }
97+ }
98+
8499 - name : Configure (Unix)
85100 if : matrix.os != 'windows-latest'
86101 shell : bash
@@ -94,14 +109,17 @@ jobs:
94109 if : matrix.os == 'windows-latest'
95110 shell : pwsh
96111 run : |
112+ $llvmDir = $env:LLVM_DIR
113+ Write-Host "Using LLVM_DIR: $llvmDir"
114+
97115 cmake -S . -B build `
98116 -G "Ninja" `
99117 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
100118 -DBUILD_TESTS=OFF `
101119 -DBUILD_BENCH=OFF `
102120 -DCMAKE_C_COMPILER="$env:LLVM_ROOT/bin/clang.exe" `
103121 -DCMAKE_CXX_COMPILER="$env:LLVM_ROOT/bin/clang++.exe" `
104- -DLLVM_DIR="$env:LLVM_DIR " `
122+ -DLLVM_DIR="$llvmDir " `
105123 -DCMAKE_PREFIX_PATH="$env:LLVM_ROOT"
106124
107125 - name : Build
Original file line number Diff line number Diff line change @@ -17,6 +17,26 @@ endif()
1717# --- LLVM Configuration ---
1818set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR} /cmake/modules" )
1919
20+ # Add explicit hints for LLVM on Windows
21+ if (WIN32 AND NOT LLVM_DIR)
22+ message (STATUS "Searching for LLVM on Windows..." )
23+ # Common LLVM installation paths on Windows
24+ set (LLVM_SEARCH_PATHS
25+ "C:/Program Files/LLVM/lib/cmake/llvm"
26+ "C:/Program Files/LLVM/share/llvm/cmake"
27+ "C:/Program Files (x86)/LLVM/lib/cmake/llvm"
28+ "C:/Program Files (x86)/LLVM/share/llvm/cmake"
29+ )
30+
31+ foreach (search_path ${LLVM_SEARCH_PATHS} )
32+ if (EXISTS "${search_path} /LLVMConfig.cmake" )
33+ set (LLVM_DIR "${search_path} " CACHE PATH "LLVM CMake directory" )
34+ message (STATUS "Found LLVM CMake files at: ${search_path} " )
35+ break ()
36+ endif ()
37+ endforeach ()
38+ endif ()
39+
2040# --- LLVM Configuration ---
2141find_package (LLVM CONFIG REQUIRED )
2242
You can’t perform that action at this time.
0 commit comments