forked from iree-org/iree
-
Notifications
You must be signed in to change notification settings - Fork 11
SHARK Runtime Windows Build
powderluv edited this page Dec 1, 2022
·
4 revisions
- Install Chrome (optional for Web UI)
- Install GIT for Windows (install for all users) tutorial
- Install Windows terminal Preview (optional)
- Install Python 3.10 from python.org (Install for all users and disable MAX Path limit)
- Install neovim / vim (for gitvim for EDITOR)
- Install Visual Studio 2022 Community Edition – Select C++ development, Python, clang (comes with clang14)
Use Developer Powershell for VS 2022 with Admin privileges
set-executionpolicy remotesigned
Edit your Powershell Profile with
notepad $PROFILE
Add the following snippet into your .ps1
cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
Get-Content "%temp%\vcvars.txt" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}
write-host "`nVisual Studio 2022 Command Prompt variables set." -ForegroundColor Yellow
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadline
}
Set-PSReadlineOption -EditMode Vi
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadlineKeyHandler -Key Tab -Function Complete
Set-Alias vi "C:\Program Files\Neovim\bin\nvim.exe"
Set-Alias vim "C:\Program Files\Neovim\bin\nvim.exe"
$ENV:EDITOR = "vi"
IMPORTANT to checkout to a single letter path like C:\X
mkdir c:\g #Important to check out in a single letter path to avoid long file path issues.
cd c:\g
git clone https://github.com/nod-ai/SHARK-runtime s
cd s
git submodule update --init
# From the root director of your checkout
./build_tools/python_deploy/build_windows.ps1
More upstream documentation available here.