This is an archive of the discontinued LLVM Phabricator instance.

sanitizer_common: link Synchronization.lib on Windows
ClosedPublic

Authored by dvyukov on Jul 16 2021, 10:57 AM.

Details

Summary

Windows bot failed with:
sanitizer_win.cpp.obj : error LNK2019: unresolved external symbol WaitOnAddress referenced in function "void cdecl sanitizer::FutexWait(struct sanitizer::atomic_uint32_t *,unsigned int)" (?FutexWait@sanitizer@@YAXPEAUatomic_uint32_t@1@I@Z)
sanitizer_win.cpp.obj : error LNK2019: unresolved external symbol WakeByAddressSingle referenced in function "void cdecl sanitizer::FutexWake(struct sanitizer::atomic_uint32_t *,unsigned int)" (?FutexWake@sanitizer@@YAXPEAUatomic_uint32_t@1@I@Z)
sanitizer_win.cpp.obj : error LNK2019: unresolved external symbol WakeByAddressAll referenced in function "void cdecl sanitizer::FutexWake(struct sanitizer::atomic_uint32_t *,unsigned int)" (?FutexWake@sanitizer@@YAXPEAUatomic_uint32_t@1@I@Z)
https://lab.llvm.org/buildbot/#/builders/127/builds/14046

According to MSDN we need to link Synchronization.lib:
https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress

Diff Detail

Event Timeline

dvyukov created this revision.Jul 16 2021, 10:57 AM
dvyukov requested review of this revision.Jul 16 2021, 10:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2021, 10:57 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
This revision was not accepted when it landed; it landed in state Needs Review.Jul 16 2021, 10:59 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.