Skip to content

radlink: honor explicit library paths for bare DEFAULTLIB names - #934

Merged
NikitaSmith057 merged 1 commit into
EpicGames:devfrom
honkstar1:codex/defaultlib-explicit-path-pr-20260903
Sep 4, 2026
Merged

radlink: honor explicit library paths for bare DEFAULTLIB names#934
NikitaSmith057 merged 1 commit into
EpicGames:devfrom
honkstar1:codex/defaultlib-explicit-path-pr-20260903

Conversation

@honkstar1

Copy link
Copy Markdown

Problem

An explicit C:/sdk/lib/provider.lib input can be followed by /DEFAULTLIB:provider.lib, either on the command line or in an object's directives. If C:/sdk/lib is not on LIBPATH, radlink searches for the bare name again and warns that it cannot find a library it has already queued by full path. LLD recognizes the explicit input's basename.

Fix

Keep a separate, case-insensitive basename table for explicitly supplied libraries. Consult it for default-library requests after the existing extension normalization and /NODEFAULTLIB check. Do not strip directory components from a request and do not mix these aliases into the path-identity table.

This preserves distinct explicitly named libraries and path-qualified defaults with identical basenames. Genuinely missing libraries still produce diagnostics; their existing warning/error severity is unchanged.

Standalone on dev@0e2b7ed2: 17 implementation lines plus one regression test in the existing test file. No dependency on #842, #892, or #932.

Validation

  • Fresh standalone Win64 Clang/LLVM 20.1.8 release and debug builds: 27 library/weak-symbol/unresolved-symbol tests passed in each, zero failures/crashes/skips.
  • The new test covers relative/absolute explicit paths, case and extension normalization, object directives, two distinct same-basename libraries, path-qualified defaults, and real missing-library diagnostics.
  • The same regression test fails on the pre-fix development binary with warning 059; it passes with LLD 20.1.8. The omitted-extension check is RAD-specific because LLD checks visited names before adding .lib.
  • The identical production fix in the combined development build passed its broader release/debug subsets (162 each, 12 existing MSVC-invoking exclusions). On the original SDK-module response file it removed the warning and produced byte-identical DLL/PDB output.

No MSVC compiler, linker, or assembler was invoked locally. The standalone tests require no proprietary SDK or compressed-object support. Full CI is separate from these focused checks.

@NikitaSmith057
NikitaSmith057 merged commit 1d7f0ce into EpicGames:dev Sep 4, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants