Repository navigation
Build the packaged debug default lib against the release CRT - #362
Merged
Merged
Conversation
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) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second half of the
v0.0-pre-alpha85release fix. #361 got DefaultLib's debug build through; the re-tagged run (36068766958) then failed on Windows one step later, at "Test Default Library": debug/compile 0/155. All three Linux jobs passed.Cause
The Windows zip ships only release-CRT (
/MT) builds ofTypeScriptAsyncRuntime.lib,gc.libandLLVMSupport.lib. Since DefaultLib #7, the debug default-lib archive is built/MTd. A program compiled without--optlinks that archive (chosen by--di), so the/MTdwrappers meet/MTlibraries:It isn't just CI: any user of the release zip doing
tslang --di --emit=exewith the default lib on Windows hits it.Fix
Set
TSLANG_DEBUG_CRT: /MTfor the Windows "Build Default Library" step. DefaultLib #10 (merged) added that override: the packaged debug archive is built against the release CRT, matching the libraries it ships with, and keeps its debug info. Unset, it stays/MTd, which is right next to a debug tslang build.Tested (Windows, release tslang, linked only against release libraries, the way the zip does)
/MTddebug archive: debug/compile 0/155 with the LNK2038 above, the same as CI.TSLANG_DEBUG_CRT=/MT, all four DefaultLib modes: release/compile, release/jit, debug/compile, debug/jit 155/155 each.gc-defaultlib-collectorandgc-shared-autoctests against the/MTarchive: 3/3.This workflow runs only on tag push, so this PR's checks do not exercise it. The re-tag after merge is the real test.
🤖 Generated with Claude Code