diff --git a/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp b/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp --- a/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp +++ b/compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp @@ -21,7 +21,9 @@ #include "hwasan_mapping.h" #include "hwasan_thread_list.h" #include "sanitizer_common/sanitizer_common.h" +#if SANITIZER_POSIX #include "sanitizer_common/sanitizer_posix.h" +#endif // The code in this file needs to run in an unrelocated binary. It should not // access any external symbol, including its own non-hidden globals.