From 9bb8977ad861ab6dbeaf675e4cdf6074f3f9aa4d Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Sun, 27 Sep 2026 15:26:53 +0100 Subject: [PATCH 1/3] Windows Release CI: official LLVM package plus a standalone MLIR build The Windows test workflow downloaded a hand-built LLVM zip from Dropbox. The official LLVM 22.1.8 Windows package (a GitHub release asset) has the LLVM, Clang and LLD libraries, lld/wasm-ld, clang and clang's resource directory, built with the static CRT the project needs - but no MLIR. The new scripts/install_llvm_prebuilt_release.ps1 unpacks it, points its exported DIA SDK path at the local Visual Studio (llvm/llvm-project#86250), builds MLIR standalone against it from the matching source release and installs MLIR into the same prefix. The prefix keeps the layout of the custom build, so 3rdParty/llvm/x64/release and everything that looks there are unchanged. The script skips itself when the prefix already has MLIR, so it never overwrites a custom build. The test tree hardcoded 3rdParty/llvm//{bin,lib} for lld and the LLVM libraries user programs link against; it now takes LLVM_TOOLS_BINARY_DIR and LLVM_LIBRARY_DIR from the LLVM the build was configured with. Same values for the existing layouts, and tests no longer silently use another LLVM than the compiler's. Verified locally: script end to end on a fresh prefix (about 11 minutes, MLIR at -j20), rerun is a no-op; tslang built against that prefix with only MLIR_DIR and Clang_DIR passes 2959/2959, with the test-runner scripts and all 8 LLVM_LIB script tests on the official lld and libraries. Debug, the Linux workflow and create-release.yml are unchanged. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/cmake-test-release-win.yml | 35 ++---- scripts/install_llvm_prebuilt_release.ps1 | 119 +++++++++++++++++++ tslang/test/tester/CMakeLists.txt | 17 ++- 3 files changed, 137 insertions(+), 34 deletions(-) create mode 100644 scripts/install_llvm_prebuilt_release.ps1 diff --git a/.github/workflows/cmake-test-release-win.yml b/.github/workflows/cmake-test-release-win.yml index a7b488698..f99f43f9e 100644 --- a/.github/workflows/cmake-test-release-win.yml +++ b/.github/workflows/cmake-test-release-win.yml @@ -13,9 +13,11 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release - CACHE_VERSION: v10 + CACHE_VERSION: v11 LLVM_VERSION: 22 - LLVM_ZIPFILE: "https://www.dropbox.com/scl/fi/q6o011dlgw7n2ebzo176q/llvm_22_1_8_release_vs2026.zip?rlkey=s2h7c64nrmyz9bire0zr3ctzh&st=3nqb99qb&dl=1" + # The official LLVM release package plus MLIR built against it, installed where a custom LLVM + # build would be - see scripts/install_llvm_prebuilt_release.ps1. + LLVM_FULL_VERSION: "22.1.8" GC_VERSION: "8.2.12" LIBATOMIC_OPS_VERSION: "7.10.0" @@ -34,26 +36,12 @@ jobs: - uses: actions/checkout@v4 - - name: Cache Build 3rd Party - id: cache-3rd-party - uses: actions/cache@v4 - with: - path: __build/llvm - key: ${{ runner.os }}-build-llvm-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }} - - name: Cache 3rd Party binaries id: cache-3rd-party-binary uses: actions/cache@v4 with: path: 3rdParty - key: ${{ runner.os }}-3rd-party-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }} - - - name: Cache 3rd Party binaries - LLVM ${{ env.LLVM_VERSION }} Release - id: cache-3rd-party-binary-llvm-release - uses: actions/cache@v4 - with: - path: llvm_${{ env.LLVM_VERSION }}_release.zip - key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-${{ env.CACHE_VERSION }} + key: ${{ runner.os }}-3rd-party-${{ env.LLVM_FULL_VERSION }}-${{ env.CACHE_VERSION }}-${{ hashFiles('scripts/install_llvm_prebuilt_release.ps1') }} - name: Delete __Build TS folders continue-on-error: true @@ -61,17 +49,14 @@ jobs: shell: pwsh - name: Create __Build Folders - run: if (!(Test-Path -Path ".\__build\tslang\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tslang\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\llvm\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\llvm\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" }; - shell: pwsh - - - name: Download 3rd party - LLVM - continue-on-error: true + run: if (!(Test-Path -Path ".\__build\tslang\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tslang\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" }; shell: pwsh - run: if (!(Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip")) { Invoke-WebRequest -SkipCertificateCheck -Uri "${{ env.LLVM_ZIPFILE }}" -OutFile "llvm_${{ env.LLVM_VERSION }}_release.zip" } - - name: UnZip 3rd party - LLVM + # Skips itself when the cached 3rdParty already has MLIR; otherwise downloads the official + # package and builds MLIR (the only part that takes a while). + - name: Install 3rd party - LLVM ${{ env.LLVM_FULL_VERSION }} + MLIR continue-on-error: false - run: if (Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip") { Expand-Archive -Path "llvm_${{ env.LLVM_VERSION }}_release.zip" -DestinationPath "3rdParty\llvm\x64" -Force } + run: ./scripts/install_llvm_prebuilt_release.ps1 -Version ${{ env.LLVM_FULL_VERSION }} shell: pwsh - name: Download 3rd party source - GC diff --git a/scripts/install_llvm_prebuilt_release.ps1 b/scripts/install_llvm_prebuilt_release.ps1 new file mode 100644 index 000000000..3bebe1f61 --- /dev/null +++ b/scripts/install_llvm_prebuilt_release.ps1 @@ -0,0 +1,119 @@ +# Installs a Release LLVM/Clang/LLD/MLIR prefix without building LLVM, Clang or LLD. +# +# The official LLVM Windows package (clang+llvm--x86_64-pc-windows-msvc.tar.xz, a GitHub +# release asset) carries the LLVM, Clang and LLD libraries with their CMake packages, lld/wasm-ld, +# clang and clang's resource directory, built with the static CRT (/MT) the project needs. It has +# no MLIR at all, so MLIR is built standalone against it (mlir/ from the matching source release) +# and installed into the same prefix. The result has the layout of a prefix made by +# config_llvm_release_vs.bat + build_llvm_release_vs.bat, so nothing that looks under +# 3rdParty/llvm/x64/release has to change. +# +# Differences from the custom build: RTTI and EH are off in the LLVM libraries (the project's MSVC +# flags force /GR /EHsc for its own code, which is fine), LLVMSupport brings rpmalloc as the +# process malloc (-INCLUDE:malloc on its CMake target), and there is no Debug variant - Debug still +# needs the custom build. +# +# Skips everything when the prefix already has MLIR, so it never overwrites a custom build. +param( + [string]$Version = "22.1.8", + [string]$Prefix = "", + [string]$WorkDir = "", + [string]$Generator = "Visual Studio 18 2026", + [int]$Jobs = [Environment]::ProcessorCount +) + +$ErrorActionPreference = "Stop" +$ProgressPreference = "SilentlyContinue" + +$repoRoot = Split-Path -Parent $PSScriptRoot +if ($Prefix -eq "") { $Prefix = Join-Path $repoRoot "3rdParty\llvm\x64\release" } +# Short by default: MSBuild's file tracker fails on paths past MAX_PATH, and MLIR's build tree is deep. +if ($WorkDir -eq "") { $WorkDir = Join-Path $repoRoot "__build\llvm-prebuilt" } +$Prefix = [IO.Path]::GetFullPath($Prefix) +$WorkDir = [IO.Path]::GetFullPath($WorkDir) +# The CMake packages want forward slashes. +$prefixCMake = $Prefix -replace '\\', '/' + +# Windows' own bsdtar reads .tar.xz; a Git for Windows tar earlier on PATH would need xz beside it. +$tar = Join-Path $env:SystemRoot "System32\tar.exe" + +function Invoke-Checked([string]$what, [scriptblock]$block) { + & $block + if ($LASTEXITCODE -ne 0) { throw "$what failed (exit code $LASTEXITCODE)" } +} + +function Get-Asset([string]$name) { + $file = Join-Path $WorkDir $name + if (-not (Test-Path $file)) { + Write-Host "Downloading $name" + Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-$Version/$name" -OutFile "$file.part" + Move-Item "$file.part" $file + } + return $file +} + +$mlirConfig = Join-Path $Prefix "lib\cmake\mlir\MLIRConfig.cmake" +if (Test-Path $mlirConfig) { + Write-Host "MLIR is already installed in $Prefix, nothing to do" + exit 0 +} + +New-Item -ItemType Directory -Force -Path $WorkDir, $Prefix | Out-Null + +# 1. The official package, unpacked into the prefix. +$llvmConfig = Join-Path $Prefix "lib\cmake\llvm\LLVMConfig.cmake" +if (-not (Test-Path $llvmConfig)) { + $package = Get-Asset "clang+llvm-$Version-x86_64-pc-windows-msvc.tar.xz" + Write-Host "Unpacking $package into $Prefix" + Invoke-Checked "Unpacking the LLVM package" { & $tar -xf $package -C $Prefix --strip-components=1 } +} +if (-not (Select-String -Path $llvmConfig -SimpleMatch "set(LLVM_PACKAGE_VERSION $Version)" -Quiet)) { + throw "$Prefix holds an LLVM other than $Version (see $llvmConfig)" +} + +# 2. LLVMDebugInfoPDB's exported link line names the DIA SDK at the path it had on the machine +# that built the package (llvm/llvm-project#86250), so every link that pulls it in fails with +# LNK1181. Point it at this machine's Visual Studio. +$vswhere = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe" +$vsPath = & $vswhere -latest -products * -property installationPath +$diaGuids = Join-Path $vsPath "DIA SDK\lib\amd64\diaguids.lib" +if (-not (Test-Path $diaGuids)) { throw "DIA SDK not found at $diaGuids" } +$exports = Join-Path $Prefix "lib\cmake\llvm\LLVMExports.cmake" +$text = [IO.File]::ReadAllText($exports) +$fixed = [regex]::Replace($text, '[^";]*/DIA SDK/lib/amd64/diaguids\.lib', ($diaGuids -replace '\\', '/')) +if ($fixed -ne $text) { + [IO.File]::WriteAllText($exports, $fixed) + Write-Host "LLVMExports.cmake: DIA SDK -> $diaGuids" +} + +# 3. MLIR sources: mlir/ plus the shared cmake/ modules it includes. +$srcRoot = Join-Path $WorkDir "llvm-project-$Version.src" +if (-not (Test-Path (Join-Path $srcRoot "mlir\CMakeLists.txt"))) { + $sources = Get-Asset "llvm-project-$Version.src.tar.xz" + Write-Host "Unpacking mlir/ and cmake/ from $sources" + Invoke-Checked "Unpacking the MLIR sources" { + & $tar -xf $sources -C $WorkDir "llvm-project-$Version.src/mlir" "llvm-project-$Version.src/cmake" + } +} + +# 4. MLIR, standalone against the unpacked LLVM, installed into the same prefix. LLVM_BUILD_UTILS +# is off in the package's LLVMConfig, and without it mlir-tblgen is built but not installed. +$buildDir = Join-Path $WorkDir "mlir-build" +Invoke-Checked "Configuring MLIR" { + cmake -S (Join-Path $srcRoot "mlir") -B $buildDir -G $Generator -A x64 -Thost=x64 -Wno-dev ` + "-DLLVM_DIR=$prefixCMake/lib/cmake/llvm" ` + "-DCMAKE_INSTALL_PREFIX=$prefixCMake" ` + -DCMAKE_BUILD_TYPE=Release ` + -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` + -DLLVM_BUILD_UTILS=ON ` + -DLLVM_INCLUDE_TESTS=OFF ` + -DMLIR_INCLUDE_TESTS=OFF ` + -DMLIR_INCLUDE_INTEGRATION_TESTS=OFF ` + -DMLIR_ENABLE_BINDINGS_PYTHON=OFF +} +Invoke-Checked "Building MLIR" { cmake --build $buildDir --config Release --target install -j $Jobs } + +foreach ($required in @($mlirConfig, (Join-Path $Prefix "bin\mlir-tblgen.exe"))) { + if (-not (Test-Path $required)) { throw "MLIR install is missing $required" } +} +Write-Host "LLVM $Version with MLIR installed in $Prefix" diff --git a/tslang/test/tester/CMakeLists.txt b/tslang/test/tester/CMakeLists.txt index 0d52bb626..a90056cb0 100644 --- a/tslang/test/tester/CMakeLists.txt +++ b/tslang/test/tester/CMakeLists.txt @@ -128,16 +128,16 @@ if (WIN32) target_compile_definitions(test-runner PUBLIC "TEST_GCPATH=\"${TEST_GC_LIBDIR}\"") target_compile_definitions(test-runner PUBLIC "TEST_TSLANG_EXEPATH=\"${CMAKE_BINARY_DIR}/bin\"") target_compile_definitions(test-runner PUBLIC "TEST_TSLANG_LIBPATH=\"${CMAKE_BINARY_DIR}/lib\"") - target_compile_definitions(test-runner PUBLIC "TEST_LLVM_EXEPATH=\"${PROJECT_SOURCE_DIR}/../3rdParty/llvm/x64/${CMAKE_BUILD_TYPE_LOWERCASE}/bin\"") - target_compile_definitions(test-runner PUBLIC "TEST_LLVM_LIBPATH=\"${PROJECT_SOURCE_DIR}/../3rdParty/llvm/x64/${CMAKE_BUILD_TYPE_LOWERCASE}/lib\"") + target_compile_definitions(test-runner PUBLIC "TEST_LLVM_EXEPATH=\"${LLVM_TOOLS_BINARY_DIR}\"") + target_compile_definitions(test-runner PUBLIC "TEST_LLVM_LIBPATH=\"${LLVM_LIBRARY_DIR}\"") else() target_compile_definitions(test-runner PUBLIC "TEST_GC_SHARED_LIBPATH=\"${TEST_GC_SHARED_PREFIX}/lib\"") target_compile_definitions(test-runner PUBLIC "TEST_GC_SHARED_BINPATH=\"${TEST_GC_SHARED_PREFIX}/lib\"") target_compile_definitions(test-runner PUBLIC "TEST_GCPATH=\"${TEST_GC_LIBDIR}\"") target_compile_definitions(test-runner PUBLIC "TEST_TSLANG_EXEPATH=\"${CMAKE_BINARY_DIR}/bin\"") target_compile_definitions(test-runner PUBLIC "TEST_TSLANG_LIBPATH=\"${CMAKE_BINARY_DIR}/lib\"") - target_compile_definitions(test-runner PUBLIC "TEST_LLVM_EXEPATH=\"${PROJECT_SOURCE_DIR}/../3rdParty/llvm/${CMAKE_BUILD_TYPE_LOWERCASE}/bin\"") - target_compile_definitions(test-runner PUBLIC "TEST_LLVM_LIBPATH=\"${PROJECT_SOURCE_DIR}/../3rdParty/llvm/${CMAKE_BUILD_TYPE_LOWERCASE}/lib\"") + target_compile_definitions(test-runner PUBLIC "TEST_LLVM_EXEPATH=\"${LLVM_TOOLS_BINARY_DIR}\"") + target_compile_definitions(test-runner PUBLIC "TEST_LLVM_LIBPATH=\"${LLVM_LIBRARY_DIR}\"") target_compile_definitions(test-runner PUBLIC "TEST_COMPILER=\"${CMAKE_CXX_COMPILER}\"") endif() @@ -2141,7 +2141,7 @@ if (WIN32) "-DWORK_DIR=${CMAKE_CURRENT_BINARY_DIR}/gc-shared-auto" "-DGC_LIB=${TEST_GC_LIBDIR}" "-DGC_SHARED_LIB=${TEST_GC_SHARED_PREFIX}/lib" - "-DLLVM_LIB=${PROJECT_SOURCE_DIR}/../3rdParty/llvm/x64/${CMAKE_BUILD_TYPE_LOWERCASE}/lib" + "-DLLVM_LIB=${LLVM_LIBRARY_DIR}" "-DTSLANG_LIB=${CMAKE_BINARY_DIR}/lib" "-DOPT=${gc_shared_auto_opt}" -P "${CMAKE_CURRENT_SOURCE_DIR}/shared-collector-auto.cmake") @@ -2158,7 +2158,7 @@ if (WIN32) "-DTSLANG=$" "-DTESTS_DIR=${PROJECT_SOURCE_DIR}/test/tester/tests" "-DWORK_DIR=${CMAKE_CURRENT_BINARY_DIR}/foreign-target-import-${foreign_import_mode}" - "-DLLVM_LIB=${PROJECT_SOURCE_DIR}/../3rdParty/llvm/x64/${CMAKE_BUILD_TYPE_LOWERCASE}/lib" + "-DLLVM_LIB=${LLVM_LIBRARY_DIR}" "-DTSLANG_LIB=${CMAKE_BINARY_DIR}/lib" -P "${CMAKE_CURRENT_SOURCE_DIR}/foreign-target-import.cmake") endforeach() @@ -2173,11 +2173,10 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") else() set(defaultlib_collector_opt "--di;--opt_level=0") endif() +set(defaultlib_collector_llvm_lib "${LLVM_LIBRARY_DIR}") if (WIN32) - set(defaultlib_collector_llvm_lib "${PROJECT_SOURCE_DIR}/../3rdParty/llvm/x64/${CMAKE_BUILD_TYPE_LOWERCASE}/lib") set(defaultlib_collector_gc_shared "-DGC_SHARED_LIB=${TEST_GC_SHARED_PREFIX}/lib") else() - set(defaultlib_collector_llvm_lib "${PROJECT_SOURCE_DIR}/../3rdParty/llvm/${CMAKE_BUILD_TYPE_LOWERCASE}/lib") set(defaultlib_collector_gc_shared "") endif() foreach(defaultlib_collector_mode jit compile) @@ -2429,7 +2428,7 @@ if (WIN32) "-DTSLANG=$" "-DSOURCE_DIR=${PROJECT_SOURCE_DIR}/test/tester/reference-path" "-DWORK_DIR=${CMAKE_CURRENT_BINARY_DIR}/reference-path-shared-reimport" - "-DLLVM_LIB=${PROJECT_SOURCE_DIR}/../3rdParty/llvm/x64/${CMAKE_BUILD_TYPE_LOWERCASE}/lib" + "-DLLVM_LIB=${LLVM_LIBRARY_DIR}" "-DTSLANG_LIB=${CMAKE_BINARY_DIR}/lib" -P "${CMAKE_CURRENT_SOURCE_DIR}/shared-import-reimport.cmake") endif() From 3504034a1a853108082dab2927e141ff0f0e9177 Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Sun, 27 Sep 2026 16:19:42 +0100 Subject: [PATCH 2/3] Windows Release CI: download prebuilt MLIR instead of building it Building MLIR on the 4-core runner took over 30 minutes (cancelled unfinished), and a cache miss would pay it again. CI now compiles no LLVM or MLIR at all: install_llvm_prebuilt_release.ps1 only downloads and unpacks the official LLVM package and a prebuilt MLIR archive into one prefix. The archive is made once per LLVM version by the new build_mlir_prebuilt_release.ps1 (MLIR standalone against the official package, installed into an empty prefix - its CMake package finds LLVM relative to itself) and hosted as the asset of the llvm-22.1.8-mlir prerelease. Shared steps live in llvm_prebuilt_common.ps1. Verified locally: the build script produces the 50 MB archive; the install script unpacks it into a fresh prefix in 40 seconds; tslang built against that prefix passes 2959/2959. The published asset's SHA-256 matches the local file. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/cmake-test-release-win.yml | 8 +- scripts/build_mlir_prebuilt_release.ps1 | 68 +++++++++++++ scripts/install_llvm_prebuilt_release.ps1 | 102 ++----------------- scripts/llvm_prebuilt_common.ps1 | 79 ++++++++++++++ 4 files changed, 162 insertions(+), 95 deletions(-) create mode 100644 scripts/build_mlir_prebuilt_release.ps1 create mode 100644 scripts/llvm_prebuilt_common.ps1 diff --git a/.github/workflows/cmake-test-release-win.yml b/.github/workflows/cmake-test-release-win.yml index f99f43f9e..60f987bd2 100644 --- a/.github/workflows/cmake-test-release-win.yml +++ b/.github/workflows/cmake-test-release-win.yml @@ -15,7 +15,7 @@ env: BUILD_TYPE: Release CACHE_VERSION: v11 LLVM_VERSION: 22 - # The official LLVM release package plus MLIR built against it, installed where a custom LLVM + # The official LLVM release package plus a prebuilt MLIR archive, installed where a custom LLVM # build would be - see scripts/install_llvm_prebuilt_release.ps1. LLVM_FULL_VERSION: "22.1.8" GC_VERSION: "8.2.12" @@ -41,7 +41,7 @@ jobs: uses: actions/cache@v4 with: path: 3rdParty - key: ${{ runner.os }}-3rd-party-${{ env.LLVM_FULL_VERSION }}-${{ env.CACHE_VERSION }}-${{ hashFiles('scripts/install_llvm_prebuilt_release.ps1') }} + key: ${{ runner.os }}-3rd-party-${{ env.LLVM_FULL_VERSION }}-${{ env.CACHE_VERSION }}-${{ hashFiles('scripts/install_llvm_prebuilt_release.ps1', 'scripts/llvm_prebuilt_common.ps1') }} - name: Delete __Build TS folders continue-on-error: true @@ -52,8 +52,8 @@ jobs: run: if (!(Test-Path -Path ".\__build\tslang\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tslang\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" }; shell: pwsh - # Skips itself when the cached 3rdParty already has MLIR; otherwise downloads the official - # package and builds MLIR (the only part that takes a while). + # Downloads and unpacks the official LLVM package and the prebuilt MLIR archive - nothing is + # compiled. Skips itself when the cached 3rdParty already has them. - name: Install 3rd party - LLVM ${{ env.LLVM_FULL_VERSION }} + MLIR continue-on-error: false run: ./scripts/install_llvm_prebuilt_release.ps1 -Version ${{ env.LLVM_FULL_VERSION }} diff --git a/scripts/build_mlir_prebuilt_release.ps1 b/scripts/build_mlir_prebuilt_release.ps1 new file mode 100644 index 000000000..2ac34fb51 --- /dev/null +++ b/scripts/build_mlir_prebuilt_release.ps1 @@ -0,0 +1,68 @@ +# Builds the prebuilt MLIR archive that install_llvm_prebuilt_release.ps1 installs - run once per +# LLVM version, by hand, then upload the archive as the asset of the release named in +# Get-MlirArchiveUrl (llvm_prebuilt_common.ps1). Background there. +# +# MLIR is built standalone (mlir/ and cmake/ from the matching llvm-project source release) against +# the official LLVM package, Release, static CRT, and installed into an empty prefix. That install +# is the archive: its CMake package finds LLVM relative to itself, so unpacked over the official +# package it needs no absolute paths. About 10 minutes at -j20; far longer on a 4-core CI runner, +# which is why CI downloads the result instead. +param( + [string]$Version = "22.1.8", + [string]$WorkDir = "", + [string]$Out = "", + [string]$Generator = "Visual Studio 18 2026", + [int]$Jobs = [Environment]::ProcessorCount +) + +. (Join-Path $PSScriptRoot "llvm_prebuilt_common.ps1") + +$repoRoot = Split-Path -Parent $PSScriptRoot +# Short by default: MSBuild's file tracker fails on paths past MAX_PATH, and MLIR's build tree is deep. +if ($WorkDir -eq "") { $WorkDir = Join-Path $repoRoot "__build\llvm-prebuilt" } +$WorkDir = [IO.Path]::GetFullPath($WorkDir) +if ($Out -eq "") { $Out = Join-Path $WorkDir (Get-MlirArchiveName $Version) } +$Out = [IO.Path]::GetFullPath($Out) +New-Item -ItemType Directory -Force -Path $WorkDir | Out-Null + +# 1. The official package to build against. +$llvmPrefix = Join-Path $WorkDir "llvm" +Install-OfficialLlvm $Version $llvmPrefix $WorkDir + +# 2. MLIR sources: mlir/ plus the shared cmake/ modules it includes. +$srcRoot = Join-Path $WorkDir "llvm-project-$Version.src" +if (-not (Test-Path (Join-Path $srcRoot "mlir\CMakeLists.txt"))) { + $sources = Get-LlvmAsset $Version "llvm-project-$Version.src.tar.xz" $WorkDir + Write-Host "Unpacking mlir/ and cmake/ from $sources" + Invoke-Checked "Unpacking the MLIR sources" { + & $script:tar -xf $sources -C $WorkDir "llvm-project-$Version.src/mlir" "llvm-project-$Version.src/cmake" + } +} + +# 3. MLIR into an empty prefix. LLVM_BUILD_UTILS is off in the package's LLVMConfig, and without +# it mlir-tblgen is built but not installed. +$buildDir = Join-Path $WorkDir "mlir-build" +$mlirPrefix = Join-Path $WorkDir "mlir-install" +if (Test-Path $mlirPrefix) { Remove-Item -Recurse -Force $mlirPrefix } +Invoke-Checked "Configuring MLIR" { + cmake -S (Join-Path $srcRoot "mlir") -B $buildDir -G $Generator -A x64 -Thost=x64 -Wno-dev ` + "-DLLVM_DIR=$(($llvmPrefix -replace '\\', '/'))/lib/cmake/llvm" ` + "-DCMAKE_INSTALL_PREFIX=$(($mlirPrefix -replace '\\', '/'))" ` + -DCMAKE_BUILD_TYPE=Release ` + -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` + -DLLVM_BUILD_UTILS=ON ` + -DLLVM_INCLUDE_TESTS=OFF ` + -DMLIR_INCLUDE_TESTS=OFF ` + -DMLIR_INCLUDE_INTEGRATION_TESTS=OFF ` + -DMLIR_ENABLE_BINDINGS_PYTHON=OFF +} +Invoke-Checked "Building MLIR" { cmake --build $buildDir --config Release --target install -j $Jobs } +foreach ($required in @("lib\cmake\mlir\MLIRConfig.cmake", "bin\mlir-tblgen.exe")) { + if (-not (Test-Path (Join-Path $mlirPrefix $required))) { throw "MLIR install is missing $required" } +} + +# 4. The archive. +if (Test-Path $Out) { Remove-Item -Force $Out } +Invoke-Checked "Packing MLIR" { & $script:tar -cJf $Out -C $mlirPrefix . } +Write-Host "Wrote $Out ($([math]::Round((Get-Item $Out).Length / 1MB)) MB)" +Write-Host "Upload it as $(Get-MlirArchiveUrl $Version)" diff --git a/scripts/install_llvm_prebuilt_release.ps1 b/scripts/install_llvm_prebuilt_release.ps1 index 3bebe1f61..2b06ab6f2 100644 --- a/scripts/install_llvm_prebuilt_release.ps1 +++ b/scripts/install_llvm_prebuilt_release.ps1 @@ -1,117 +1,37 @@ -# Installs a Release LLVM/Clang/LLD/MLIR prefix without building LLVM, Clang or LLD. -# -# The official LLVM Windows package (clang+llvm--x86_64-pc-windows-msvc.tar.xz, a GitHub -# release asset) carries the LLVM, Clang and LLD libraries with their CMake packages, lld/wasm-ld, -# clang and clang's resource directory, built with the static CRT (/MT) the project needs. It has -# no MLIR at all, so MLIR is built standalone against it (mlir/ from the matching source release) -# and installed into the same prefix. The result has the layout of a prefix made by -# config_llvm_release_vs.bat + build_llvm_release_vs.bat, so nothing that looks under -# 3rdParty/llvm/x64/release has to change. -# -# Differences from the custom build: RTTI and EH are off in the LLVM libraries (the project's MSVC -# flags force /GR /EHsc for its own code, which is fine), LLVMSupport brings rpmalloc as the -# process malloc (-INCLUDE:malloc on its CMake target), and there is no Debug variant - Debug still -# needs the custom build. +# Installs a Release LLVM/Clang/LLD/MLIR prefix from prebuilt archives only - nothing is compiled: +# the official LLVM Windows package, then the MLIR archive made by build_mlir_prebuilt_release.ps1, +# unpacked into the same prefix. Background in llvm_prebuilt_common.ps1. # # Skips everything when the prefix already has MLIR, so it never overwrites a custom build. param( [string]$Version = "22.1.8", [string]$Prefix = "", [string]$WorkDir = "", - [string]$Generator = "Visual Studio 18 2026", - [int]$Jobs = [Environment]::ProcessorCount + # A URL or a local file; defaults to the release asset named in llvm_prebuilt_common.ps1. + [string]$MlirArchive = "" ) -$ErrorActionPreference = "Stop" -$ProgressPreference = "SilentlyContinue" +. (Join-Path $PSScriptRoot "llvm_prebuilt_common.ps1") $repoRoot = Split-Path -Parent $PSScriptRoot if ($Prefix -eq "") { $Prefix = Join-Path $repoRoot "3rdParty\llvm\x64\release" } -# Short by default: MSBuild's file tracker fails on paths past MAX_PATH, and MLIR's build tree is deep. if ($WorkDir -eq "") { $WorkDir = Join-Path $repoRoot "__build\llvm-prebuilt" } +if ($MlirArchive -eq "") { $MlirArchive = Get-MlirArchiveUrl $Version } $Prefix = [IO.Path]::GetFullPath($Prefix) $WorkDir = [IO.Path]::GetFullPath($WorkDir) -# The CMake packages want forward slashes. -$prefixCMake = $Prefix -replace '\\', '/' - -# Windows' own bsdtar reads .tar.xz; a Git for Windows tar earlier on PATH would need xz beside it. -$tar = Join-Path $env:SystemRoot "System32\tar.exe" - -function Invoke-Checked([string]$what, [scriptblock]$block) { - & $block - if ($LASTEXITCODE -ne 0) { throw "$what failed (exit code $LASTEXITCODE)" } -} - -function Get-Asset([string]$name) { - $file = Join-Path $WorkDir $name - if (-not (Test-Path $file)) { - Write-Host "Downloading $name" - Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-$Version/$name" -OutFile "$file.part" - Move-Item "$file.part" $file - } - return $file -} $mlirConfig = Join-Path $Prefix "lib\cmake\mlir\MLIRConfig.cmake" if (Test-Path $mlirConfig) { Write-Host "MLIR is already installed in $Prefix, nothing to do" exit 0 } - New-Item -ItemType Directory -Force -Path $WorkDir, $Prefix | Out-Null -# 1. The official package, unpacked into the prefix. -$llvmConfig = Join-Path $Prefix "lib\cmake\llvm\LLVMConfig.cmake" -if (-not (Test-Path $llvmConfig)) { - $package = Get-Asset "clang+llvm-$Version-x86_64-pc-windows-msvc.tar.xz" - Write-Host "Unpacking $package into $Prefix" - Invoke-Checked "Unpacking the LLVM package" { & $tar -xf $package -C $Prefix --strip-components=1 } -} -if (-not (Select-String -Path $llvmConfig -SimpleMatch "set(LLVM_PACKAGE_VERSION $Version)" -Quiet)) { - throw "$Prefix holds an LLVM other than $Version (see $llvmConfig)" -} - -# 2. LLVMDebugInfoPDB's exported link line names the DIA SDK at the path it had on the machine -# that built the package (llvm/llvm-project#86250), so every link that pulls it in fails with -# LNK1181. Point it at this machine's Visual Studio. -$vswhere = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe" -$vsPath = & $vswhere -latest -products * -property installationPath -$diaGuids = Join-Path $vsPath "DIA SDK\lib\amd64\diaguids.lib" -if (-not (Test-Path $diaGuids)) { throw "DIA SDK not found at $diaGuids" } -$exports = Join-Path $Prefix "lib\cmake\llvm\LLVMExports.cmake" -$text = [IO.File]::ReadAllText($exports) -$fixed = [regex]::Replace($text, '[^";]*/DIA SDK/lib/amd64/diaguids\.lib', ($diaGuids -replace '\\', '/')) -if ($fixed -ne $text) { - [IO.File]::WriteAllText($exports, $fixed) - Write-Host "LLVMExports.cmake: DIA SDK -> $diaGuids" -} +Install-OfficialLlvm $Version $Prefix $WorkDir -# 3. MLIR sources: mlir/ plus the shared cmake/ modules it includes. -$srcRoot = Join-Path $WorkDir "llvm-project-$Version.src" -if (-not (Test-Path (Join-Path $srcRoot "mlir\CMakeLists.txt"))) { - $sources = Get-Asset "llvm-project-$Version.src.tar.xz" - Write-Host "Unpacking mlir/ and cmake/ from $sources" - Invoke-Checked "Unpacking the MLIR sources" { - & $tar -xf $sources -C $WorkDir "llvm-project-$Version.src/mlir" "llvm-project-$Version.src/cmake" - } -} - -# 4. MLIR, standalone against the unpacked LLVM, installed into the same prefix. LLVM_BUILD_UTILS -# is off in the package's LLVMConfig, and without it mlir-tblgen is built but not installed. -$buildDir = Join-Path $WorkDir "mlir-build" -Invoke-Checked "Configuring MLIR" { - cmake -S (Join-Path $srcRoot "mlir") -B $buildDir -G $Generator -A x64 -Thost=x64 -Wno-dev ` - "-DLLVM_DIR=$prefixCMake/lib/cmake/llvm" ` - "-DCMAKE_INSTALL_PREFIX=$prefixCMake" ` - -DCMAKE_BUILD_TYPE=Release ` - -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` - -DLLVM_BUILD_UTILS=ON ` - -DLLVM_INCLUDE_TESTS=OFF ` - -DMLIR_INCLUDE_TESTS=OFF ` - -DMLIR_INCLUDE_INTEGRATION_TESTS=OFF ` - -DMLIR_ENABLE_BINDINGS_PYTHON=OFF -} -Invoke-Checked "Building MLIR" { cmake --build $buildDir --config Release --target install -j $Jobs } +if ($MlirArchive -match '^https?://') { $MlirArchive = Get-Download $MlirArchive $WorkDir } +Write-Host "Unpacking $MlirArchive into $Prefix" +Invoke-Checked "Unpacking the MLIR archive" { & $script:tar -xf $MlirArchive -C $Prefix } foreach ($required in @($mlirConfig, (Join-Path $Prefix "bin\mlir-tblgen.exe"))) { if (-not (Test-Path $required)) { throw "MLIR install is missing $required" } diff --git a/scripts/llvm_prebuilt_common.ps1 b/scripts/llvm_prebuilt_common.ps1 new file mode 100644 index 000000000..fa6369101 --- /dev/null +++ b/scripts/llvm_prebuilt_common.ps1 @@ -0,0 +1,79 @@ +# Shared by build_mlir_prebuilt_release.ps1 and install_llvm_prebuilt_release.ps1 (dot-sourced). +# +# The official LLVM Windows package (clang+llvm--x86_64-pc-windows-msvc.tar.xz, a GitHub +# release asset of llvm/llvm-project) carries the LLVM, Clang and LLD libraries with their CMake +# packages, lld/wasm-ld, clang and clang's resource directory, built with the static CRT (/MT) the +# project needs. It has no MLIR at all. build_mlir_prebuilt_release.ps1 builds MLIR standalone +# against it once and packs the MLIR install; install_llvm_prebuilt_release.ps1 unpacks both into +# one prefix, which then has the layout of a prefix made by config_llvm_release_vs.bat + +# build_llvm_release_vs.bat. Nothing is compiled on the machine that installs. +# +# Differences from the custom build: RTTI and EH are off in the LLVM libraries (the project's MSVC +# flags force /GR /EHsc for its own code, which is fine), LLVMSupport brings rpmalloc as the +# process malloc (-INCLUDE:malloc on its CMake target), and there is no Debug variant - Debug still +# needs the custom build. + +$ErrorActionPreference = "Stop" +$ProgressPreference = "SilentlyContinue" + +# Windows' own bsdtar reads and writes .tar.xz; a Git for Windows tar earlier on PATH would need xz +# beside it. +$script:tar = Join-Path $env:SystemRoot "System32\tar.exe" + +function Invoke-Checked([string]$what, [scriptblock]$block) { + & $block + if ($LASTEXITCODE -ne 0) { throw "$what failed (exit code $LASTEXITCODE)" } +} + +# Downloads $url into $dir unless it is already there; returns the file. +function Get-Download([string]$url, [string]$dir) { + $file = Join-Path $dir ([IO.Path]::GetFileName(([Uri]$url).AbsolutePath)) + if (-not (Test-Path $file)) { + Write-Host "Downloading $url" + Invoke-WebRequest -Uri $url -OutFile "$file.part" + Move-Item "$file.part" $file + } + return $file +} + +function Get-LlvmAsset([string]$version, [string]$name, [string]$dir) { + return Get-Download "https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/$name" $dir +} + +# Unpacks the official package into $prefix (unless it is there) and checks its version. +function Install-OfficialLlvm([string]$version, [string]$prefix, [string]$workDir) { + $llvmConfig = Join-Path $prefix "lib\cmake\llvm\LLVMConfig.cmake" + if (-not (Test-Path $llvmConfig)) { + $package = Get-LlvmAsset $version "clang+llvm-$version-x86_64-pc-windows-msvc.tar.xz" $workDir + New-Item -ItemType Directory -Force -Path $prefix | Out-Null + Write-Host "Unpacking $package into $prefix" + Invoke-Checked "Unpacking the LLVM package" { & $script:tar -xf $package -C $prefix --strip-components=1 } + } + if (-not (Select-String -Path $llvmConfig -SimpleMatch "set(LLVM_PACKAGE_VERSION $version)" -Quiet)) { + throw "$prefix holds an LLVM other than $version (see $llvmConfig)" + } + Repair-DiaSdkPath $prefix +} + +# LLVMDebugInfoPDB's exported link line names the DIA SDK at the path it had on the machine that +# built the package (llvm/llvm-project#86250), so every link that pulls it in fails with LNK1181. +# Point it at this machine's Visual Studio. +function Repair-DiaSdkPath([string]$prefix) { + $vswhere = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe" + $vsPath = & $vswhere -latest -products * -property installationPath + $diaGuids = Join-Path $vsPath "DIA SDK\lib\amd64\diaguids.lib" + if (-not (Test-Path $diaGuids)) { throw "DIA SDK not found at $diaGuids" } + $exports = Join-Path $prefix "lib\cmake\llvm\LLVMExports.cmake" + $text = [IO.File]::ReadAllText($exports) + $fixed = [regex]::Replace($text, '[^";]*/DIA SDK/lib/amd64/diaguids\.lib', ($diaGuids -replace '\\', '/')) + if ($fixed -ne $text) { + [IO.File]::WriteAllText($exports, $fixed) + Write-Host "LLVMExports.cmake: DIA SDK -> $diaGuids" + } +} + +# The MLIR archive's name, and where install_llvm_prebuilt_release.ps1 looks for it by default. +function Get-MlirArchiveName([string]$version) { return "mlir-$version-x86_64-pc-windows-msvc-mt.tar.xz" } +function Get-MlirArchiveUrl([string]$version) { + return "https://github.com/ASDAlexander77/TypeScriptCompiler/releases/download/llvm-$version-mlir/$(Get-MlirArchiveName $version)" +} From 88e5b7e8cae85da791191f55f59c47337f3639a3 Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Sun, 27 Sep 2026 16:46:28 +0100 Subject: [PATCH 3/3] Windows release build: prebuilt LLVM + MLIR instead of the Dropbox zip The Windows job of create-release.yml installs LLVM the way the Windows test workflow now does: install_llvm_prebuilt_release.ps1 unpacks the official LLVM package and the prebuilt MLIR archive into 3rdParty/llvm/x64/release, so the default library build, LLVM_LIB_PATH and the wasm-ld copy are unchanged. The release zip stages only clang's resource headers (lib/clang// include): the official package also carries compiler-rt's libraries under lib/clang//lib, 25 MB that neither tsbindgen nor tslang uses. The staged tree is the same 15 MB as before (checked against the official package locally). The Linux job still uses its Dropbox archive. CACHE_VERSION is shared with it and left alone; the Windows cache key changes with LLVM_FULL_VERSION and the install scripts' hash. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/create-release.yml | 40 +++++++++------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ab75f6618..c40971b88 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -14,7 +14,9 @@ env: ASSET_NAME: tslang-${{ github.ref_name }} CACHE_VERSION: v10 LLVM_VERSION: 22 - LLVM_ZIPFILE: "https://www.dropbox.com/scl/fi/q6o011dlgw7n2ebzo176q/llvm_22_1_8_release_vs2026.zip?rlkey=s2h7c64nrmyz9bire0zr3ctzh&st=3nqb99qb&dl=1" + # Windows: the official LLVM release package plus a prebuilt MLIR archive, installed where a + # custom LLVM build would be - see scripts/install_llvm_prebuilt_release.ps1. + LLVM_FULL_VERSION: "22.1.8" LLVM_TARGZFILE: "https://www.dropbox.com/scl/fi/ym6xvv8ib6yyewgf47ene/llvm_22_1_8_release.tgz?rlkey=jwkrrp82lql46qd1oysg9p736&st=p828hd39&dl=1" GC_VERSION: "8.2.12" LIBATOMIC_OPS_VERSION: "7.10.0" @@ -30,26 +32,12 @@ jobs: - name: Build project # This would actually build your project, using zip for an example artifact run: echo 'SELECTED_COLOR=green Build project (Windows)' >> "$GITHUB_OUTPUT" - - name: Cache Build 3rd Party - id: cache-3rd-party - uses: actions/cache@v4 - with: - path: __build/llvm - key: ${{ runner.os }}-build-llvm-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }} - - name: Cache 3rd Party binaries id: cache-3rd-party-binary uses: actions/cache@v4 with: path: 3rdParty - key: ${{ runner.os }}-3rd-party-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }} - - - name: Cache 3rd Party binaries - LLVM ${{ env.LLVM_VERSION }} Release - id: cache-3rd-party-binary-llvm-release - uses: actions/cache@v4 - with: - path: llvm_${{ env.LLVM_VERSION }}_release.zip - key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-${{ env.CACHE_VERSION }} + key: ${{ runner.os }}-3rd-party-${{ env.LLVM_FULL_VERSION }}-${{ env.CACHE_VERSION }}-${{ hashFiles('scripts/install_llvm_prebuilt_release.ps1', 'scripts/llvm_prebuilt_common.ps1') }} - name: Retrieve version run: echo "TAG_NAME=$(git describe --abbrev=0 --tags)" >> "$GITHUB_OUTPUT" @@ -63,17 +51,14 @@ jobs: shell: pwsh - name: Create __Build Folders - run: if (!(Test-Path -Path ".\__build\tslang\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tslang\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\llvm\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\llvm\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" }; + run: if (!(Test-Path -Path ".\__build\tslang\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tslang\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" }; shell: pwsh - - name: Download 3rd party - LLVM - continue-on-error: true - shell: pwsh - run: if (!(Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip")) { Invoke-WebRequest -SkipCertificateCheck -Uri "${{ env.LLVM_ZIPFILE }}" -OutFile "llvm_${{ env.LLVM_VERSION }}_release.zip" } - - - name: UnZip 3rd party - LLVM + # Downloads and unpacks the official LLVM package and the prebuilt MLIR archive - nothing is + # compiled. Skips itself when the cached 3rdParty already has them. + - name: Install 3rd party - LLVM ${{ env.LLVM_FULL_VERSION }} + MLIR continue-on-error: false - run: if (Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip") { Expand-Archive -Path "llvm_${{ env.LLVM_VERSION }}_release.zip" -DestinationPath "3rdParty\llvm\x64" -Force } + run: ./scripts/install_llvm_prebuilt_release.ps1 -Version ${{ env.LLVM_FULL_VERSION }} shell: pwsh - name: Download 3rd party source - GC @@ -228,12 +213,13 @@ jobs: # plus the shared collector in its own folder, because its import library is also named # gc.lib: gcdll/gc.lib + gcdll/gc.dll, for programs that load a tslang shared library. # tsbindgen looks for clang's resource directory next to itself as lib/clang/ - # (findResourceDir's "release package" candidate), so stage that layout too. + # (findResourceDir's "release package" candidate), so stage that layout too - its headers + # only: the official LLVM package also puts compiler-rt's libraries under + # lib/clang//lib, which neither tsbindgen nor tslang uses. run: | New-Item -ItemType Directory -Force -Path .\gcdll_stage\gcdll | Out-Null Copy-Item -Path ..\3rdParty\gcdll\x64\release\lib\gc.lib, ..\3rdParty\gcdll\x64\release\bin\gc.dll -Destination .\gcdll_stage\gcdll -ErrorAction Stop - New-Item -ItemType Directory -Force -Path .\resourcedir_stage\lib | Out-Null - Copy-Item -Path ..\3rdParty\llvm\x64\release\lib\clang -Destination .\resourcedir_stage\lib -Recurse -ErrorAction Stop + Get-ChildItem -Path ..\3rdParty\llvm\x64\release\lib\clang -Directory | ForEach-Object { $dest = ".\resourcedir_stage\lib\clang\$($_.Name)"; New-Item -ItemType Directory -Force -Path $dest | Out-Null; Copy-Item -Path (Join-Path $_.FullName "include") -Destination $dest -Recurse -ErrorAction Stop } Get-ChildItem -Path .\tslang\msbuild\x64\release\bin\tslang.exe, .\tslang\msbuild\x64\release\bin\tsbindgen.exe, .\tslang\msbuild\x64\release\bin\TypeScriptRuntime.dll, .\tslang\msbuild\x64\release\bin\gc.dll, .\gc\msbuild\x64\release\${{ env.BUILD_TYPE }}\gc.lib, .\tslang\msbuild\x64\release\lib\TypeScriptAsyncRuntime.lib, ..\3rdParty\llvm\x64\release\bin\wasm-ld.exe, ..\TypeScriptCompilerDefaultLib\__build, .\gcdll_stage, .\resourcedir_stage | Compress-Archive -DestinationPath ..\${{ env.ASSET_NAME }}-windows-x64.zip shell: pwsh