This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizer] Add #include to fix (some) Windows build
AbandonedPublic

Authored by sberg on Sep 22 2021, 11:32 PM.

Details

Reviewers
tejohnson
Summary

After 56dec4be9bd321a8fc0f19df00a8d63fc44813f5 "[Sanitizer] Allow setting the report path to create directory" introducing a call to _mkdir, at least my Windows build using VS 2022 Preview (17.0.0 Preview 4.1) started to fail with

compiler-rt\lib\sanitizer_common\sanitizer_win.cpp(568): error C3861: '_mkdir': identifier not found

and https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mkdir-wmkdir?view=msvc-160 "_mkdir, _wmkdir" says this requires <direct.h>.

Diff Detail

Event Timeline

sberg requested review of this revision.Sep 22 2021, 11:32 PM
sberg created this revision.
Herald added a subscriber: Restricted Project. · View Herald TranscriptSep 22 2021, 11:32 PM
xgupta added a subscriber: xgupta.Sep 23 2021, 4:01 AM

For some reason patch application is failing on CI, while on local system it is fine. I reported this on here - https://github.com/google/llvm-premerge-checks/issues/351.

Thanks! But I already fixed this yesterday in 1864976c967de36146eb5a5b86e6312d466e1031.

sberg abandoned this revision.Sep 23 2021, 8:15 AM

ah, even better :)