radlink: honor explicitly supplied ASan runtime libraries - #941
Open
honkstar1 wants to merge 1 commit into
Open
Conversation
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.
Summary
Honor already-requested ASan runtime libraries instead of inferring a second, differently named SDK runtime.
A FortniteClient ASan link explicitly supplies EpicClang's
clang_rt.asan_dynamic.libandclang_rt.asan_dynamic_runtime_thunk.lib. The old inference path additionally requests the MSVC*-x86_64.libvariants and whole-archives the SDK thunk. Loading both produces multiply-defined__asan_globals_startand weak-registration symbols.Changes
The lookup runs only during ASan inference, not per object or relocation.
Regression coverage
Synthetic COFF libraries exercise 12 positive combinations: dynamic/static CRTs, explicit pairs, either component alone, unchanged defaults, explicit canonical names, and companion fallback through LIBPATH. Paths with spaces and whole-archive registration are checked. A negative case explicitly loads conflicting thunks and must still report the duplicate.
Validation
dev@47de6bf3, without the optimization/compressed-object stack.import_export, whose assertion was separately reproduced on the unmodified upstream baseline).5f2c8d69linker and passes with this change.5f2c8d69; the fixed combined linker completes it with no diagnostics. The generated image importsclang_rt.asan_dynamic.dll, not the SDK's second ASan DLL. Original response and input size/timestamp metadata remained unchanged; outputs were redirected to an isolated directory.No proprietary Engine objects/libraries are added as fixtures. The game executable was not launched; no runtime ASan/farm/UBA/Wine or performance result is claimed. No installed Engine linker is replaced by this PR.