Skip to content

The default library's folder is searched when it is linked by path - #625

Merged
ASDAlexander77 merged 1 commit into
mainfrom
fix-linux-defaultlib-link
Oct 20, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
fix-linux-defaultlib-link

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Why

The v0.0-pre-alpha105 release failed on all three Ubuntu jobs at "Test Compiler with Default Library":

/usr/bin/ld: cannot find -lTypeScriptDefaultLibCore: No such file or directory

#609 links the static default library by its full path, so the borrow facts are read from the same file that gets linked. That change dropped the library folder's -L. On Linux, libTypeScriptDefaultLib.a is a GNU ld script, INPUT(-lTypeScriptDefaultLibCore -lcurl). The linker resolves its -l through the -L paths, so every --emit=exe that linked the default library failed. Windows links a real .lib, which is why it stayed green. PR CI doesn't build DefaultLib, so only the release workflow ran this test.

Change

tslang/tslang/exe.cpp: the default library is still linked by path, and its folder is now passed with -L too.

Verified

  • Linux (WSL): reproduced the failure on main. With the fix, test-compile-gc-defaultlib-collector passes. DefaultLib's tests.sh, the release's next step, passes 167/167 in every pass.
  • Windows: with DEFAULT_LIB_PATH set, the defaultlib collector, Android link and test-borrow-facts-defaultlib tests pass.

Once this merges, v0.0-pre-alpha105 gets re-tagged on the new main.

🤖 Generated with Claude Code

#609 links the static default library by its full path and dropped its -L.
On Linux libTypeScriptDefaultLib.a is a GNU ld script,
INPUT(-lTypeScriptDefaultLibCore -lcurl), whose archive the linker looks up
through the -L paths: every --emit=exe with the default library failed with
"cannot find -lTypeScriptDefaultLibCore" (v0.0-pre-alpha105 release, Linux).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit da473ec into main Oct 20, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the fix-linux-defaultlib-link branch October 20, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant