diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp --- a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp +++ b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp @@ -303,6 +303,7 @@ #endif // HWASAN_WITH_INTERCEPTORS && __aarch64__ +#if HWASAN_WITH_INTERCEPTORS static void BeforeFork() { StackDepotLockAll(); } @@ -318,6 +319,7 @@ AfterFork(); return pid; } +#endif // HWASAN_WITH_INTERCEPTORS namespace __hwasan { @@ -334,9 +336,9 @@ static int inited = 0; CHECK_EQ(inited, 0); +#if HWASAN_WITH_INTERCEPTORS INTERCEPT_FUNCTION(fork); -#if HWASAN_WITH_INTERCEPTORS #if defined(__linux__) INTERCEPT_FUNCTION(vfork); #endif // __linux__