This is an archive of the discontinued LLVM Phabricator instance.

[clang][Driver] Pass /INFERASANLIBS:NO to link.exe under -fsanitize=address
ClosedPublic

Authored by aeubanks on Feb 23 2023, 4:20 PM.

Details

Summary

With recent MSVC releases, STL headers will add /INFERASANLIBS to the drectve section of object files that are compiled with clang. With this flag, link.exe will automatically attempt to look for asan libs.

When using clang as the driver to invoke the linker, we want to disable this feature because we explicitly pass the proper asan libraries, otherwise we get symbols defined multiple times.

Diff Detail

Event Timeline

aeubanks created this revision.Feb 23 2023, 4:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2023, 4:20 PM
aeubanks requested review of this revision.Feb 23 2023, 4:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2023, 4:20 PM
hans accepted this revision.Feb 24 2023, 5:00 AM

lgtm

This revision is now accepted and ready to land.Feb 24 2023, 5:00 AM
This revision was landed with ongoing or failed builds.Feb 24 2023, 9:35 AM
This revision was automatically updated to reflect the committed changes.