Build the native wrappers with the CRT tslang links against - #7
Open
ASDAlexander77 wants to merge 1 commit into
Open
ASDAlexander77 wants to merge 1 commit into
ASDAlexander77 wants to merge 1 commit into
Conversation
build_core.bat compiled io/datetime/regex/thread/http.cpp without a runtime library flag, so cl used its default /MT (static release CRT) for the debug build as well. A debug tslang program (--di, no --opt) links the debug archive together with the static debug CRT (libcmtd, _ITERATOR_DEBUG_LEVEL=2), so `tslang --emit=exe` against lib\debug\<model>\TypeScriptDefaultLib.lib failed with LNK2038 RuntimeLibrary / _ITERATOR_DEBUG_LEVEL mismatches in TypeScriptDefaultLib.lib(datetime.obj). This is what failed test-compile-gc-defaultlib-collector in a debug TypeScriptCompiler build. Debug now passes /MTd; release passes /MT explicitly (unchanged behaviour). Co-Authored-By: Claude Opus 5 <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.
Problem
scripts/build_core.batcompiledio,datetime,regex,threadandhttp.cppwithout a runtime library flag, soclfell back to its default/MT(static release CRT) in the debug build too.A debug tslang program (
--di, no--opt) linkslib\debug\<model>\TypeScriptDefaultLib.libtogether with the static debug CRT (libcmtd,_ITERATOR_DEBUG_LEVEL=2, seetslang/tslang/exe.cpp). Linking an exe against the debug archive therefore failed:This is what fails
test-compile-gc-defaultlib-collectorin a debug TypeScriptCompiler build. CI builds Release only, so it never showed up there.Fix
DBG_CL=/MTd /Z7 /std:c++latestDBG_CL=/MT /std:c++latest(explicit; same as the previous default)Tested
Rebuilt
scripts\build_vs.bat debug gcand ran TypeScriptCompiler's debugtest-compile-gc-defaultlib-collector,test-jit-gc-defaultlib-collectorandtest-compile-gc-shared-autoagainst it (DEFAULT_LIB_PATHpointed at the rebuilt__build): all pass. The other two also need a TypeScriptCompiler fix for a CRT report hook breakpoint at exit, which comes in a separate PR there. Only the debug gc model was rebuilt here; rc/none use the same flags.🤖 Generated with Claude Code