From c62dae78fa05f256a6bc8178c4dca7b380f1da18 Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Fri, 25 Sep 2026 00:14:23 +0100 Subject: [PATCH] Build the packaged debug default lib against the release CRT The Windows release zip ships only /MT builds of TypeScriptAsyncRuntime.lib, gc.lib and LLVMSupport.lib, but DefaultLib builds its debug archive /MTd, so a program compiled without --opt linked /MTd wrappers against /MT libraries and failed with LNK2038. That failed v0.0-pre-alpha85 at "Test Default Library" (debug/compile 0/155) and would fail any user's `--di` build. Set TSLANG_DEBUG_CRT=/MT for the DefaultLib build step (DefaultLib #10), so the packaged debug archive matches the libraries it ships with. It keeps its debug info. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/create-release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 5b9c03b96..0128c09fc 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -184,6 +184,10 @@ jobs: GC_SHARED_LIB_PATH: ${{github.workspace}}/3rdParty/gcdll/x64/release/lib LLVM_LIB_PATH: ${{github.workspace}}/3rdParty/llvm/x64/release/lib TSLANG_LIB_PATH: ${{github.workspace}}/__build/tslang/msbuild/x64/release/lib + # This package ships only release-CRT (/MT) builds of TypeScriptAsyncRuntime.lib, gc.lib + # and LLVMSupport.lib, so the debug archive has to be /MT too or a `--di` program cannot + # link with them (LNK2038). It keeps its debug info. See DefaultLib's build_core.bat. + TSLANG_DEBUG_CRT: /MT run: | $env:VSWHERE_PATH = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" .\build.bat