Don't /LTCG CRT initializers - #2314
Conversation
Alex Guteniev (AlexGuteniev)
left a comment
There was a problem hiding this comment.
After TryAcquireSRWLockExclusive is impoerted statically due to Vista drop, the only way to observe the difference would be __crtGetSystemTimePreciseAsFileTime, which affects system_clock::now() granularity. I don't think we need a test for it.
|
I have manually verified the fix. // cl /EHsc /nologo /W4 /MD /Zi /Fdmeow.pdb meow.cpp
#include <cstdio>
#include <mutex>
using namespace std;
int main() {
mutex mut;
puts("BEFORE");
mut.lock();
puts("DURING");
mut.unlock();
puts("AFTER");
}Before this PR, stepping into
After this PR, it calls:
|
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks Alex Guteniev (@AlexGuteniev) for finding and Casey Carter (@CaseyCarter) for fixing this lurking bug! 🐞 🛠️ 😸 |
Fixes #2311
I verified the fix manually; open to suggestions for test coverage.