@@ -32,7 +32,7 @@ function New-TemporaryDirectory {
32
32
}
33
33
34
34
# Check if required programs are available
35
- $requiredPrograms = " cmake" , " git"
35
+ $requiredPrograms = " cmake" , " git" , " ninja "
36
36
foreach ($prog in $requiredPrograms ) {
37
37
if (-not (Get-Command $prog - ErrorAction SilentlyContinue)) {
38
38
Msg " This script needs $prog , but it isn't in PATH"
@@ -105,7 +105,7 @@ if (-not $installPrefix) { Fail "please set --install-prefix" }
105
105
Msg " ##########################################################"
106
106
Msg " # Fetching LLVM from $repo at $branch "
107
107
Msg " ##########################################################"
108
- # git clone --depth 1 --branch $branch $repo $sourceDir
108
+ git clone -- depth 1 -- branch $branch $repo $sourceDir
109
109
110
110
# Configure LLVM with CMake
111
111
Msg " ##########################################################"
@@ -138,8 +138,9 @@ $cmakeArgumentsForSlang = @(
138
138
139
139
$buildDir = Join-Path $sourceDir " build"
140
140
New-Item - Path $buildDir - ItemType Directory - Force
141
-
142
- cmake - S $sourceDir \llvm - B $buildDir $cmakeArgumentsForSlang + $extraArguments
141
+ $myScriptDir = Split-Path - Parent $MyInvocation.MyCommand.Path
142
+ $toolchainFile = Join-Path $myScriptDir " WindowsToolchain\Windows.MSVC.toolchain.cmake"
143
+ cmake - S $sourceDir \llvm - B $buildDir $cmakeArgumentsForSlang + $extraArguments - G " Ninja" -- toolchain $toolchainFile
143
144
144
145
# Build LLVM
145
146
Msg " ##########################################################"
0 commit comments