summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
m---------external/WindowsToolchain0
-rw-r--r--external/build-llvm.ps19
2 files changed, 5 insertions, 4 deletions
diff --git a/external/WindowsToolchain b/external/WindowsToolchain
new file mode 160000
+Subproject 675a6f7f78e27526424a281646b6d9599d1bc28
diff --git a/external/build-llvm.ps1 b/external/build-llvm.ps1
index b777d2173..ff18ed12a 100644
--- a/external/build-llvm.ps1
+++ b/external/build-llvm.ps1
@@ -32,7 +32,7 @@ function New-TemporaryDirectory {
}
# Check if required programs are available
-$requiredPrograms = "cmake", "git"
+$requiredPrograms = "cmake", "git", "ninja"
foreach ($prog in $requiredPrograms) {
if (-not (Get-Command $prog -ErrorAction SilentlyContinue)) {
Msg "This script needs $prog, but it isn't in PATH"
@@ -105,7 +105,7 @@ if (-not $installPrefix) { Fail "please set --install-prefix" }
Msg "##########################################################"
Msg "# Fetching LLVM from $repo at $branch"
Msg "##########################################################"
-# git clone --depth 1 --branch $branch $repo $sourceDir
+git clone --depth 1 --branch $branch $repo $sourceDir
# Configure LLVM with CMake
Msg "##########################################################"
@@ -138,8 +138,9 @@ $cmakeArgumentsForSlang = @(
$buildDir = Join-Path $sourceDir "build"
New-Item -Path $buildDir -ItemType Directory -Force
-
-cmake -S $sourceDir\llvm -B $buildDir $cmakeArgumentsForSlang + $extraArguments
+$myScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
+$toolchainFile = Join-Path $myScriptDir "WindowsToolchain\Windows.MSVC.toolchain.cmake"
+cmake -S $sourceDir\llvm -B $buildDir $cmakeArgumentsForSlang + $extraArguments -G "Ninja" --toolchain $toolchainFile
# Build LLVM
Msg "##########################################################"