[BOLT][Hugify] Fix apple builds
authorRafael Auler <rafaelauler@fb.com>
Fri, 4 Nov 2022 20:08:31 +0000 (13:08 -0700)
committerRafael Auler <rafaelauler@fb.com>
Fri, 4 Nov 2022 20:10:29 +0000 (13:10 -0700)
Fix placement of ifdefs in hugify.cpp after D129107 landed.

bolt/runtime/hugify.cpp

index d8a2d8b..05c1be4 100644 (file)
@@ -6,8 +6,7 @@
 //
 //===---------------------------------------------------------------------===//
 
-#if defined (__x86_64__)
-#if !defined(__APPLE__)
+#if defined (__x86_64__) && !defined(__APPLE__)
 
 #include "common.h"
 
@@ -136,7 +135,6 @@ static void hugifyForOldKernel(uint8_t *From, uint8_t *To) {
 
   __munmap(Mem, Size);
 }
-#endif
 
 extern "C" void __bolt_hugify_self_impl() {
   uint8_t *HotStart = (uint8_t *)&__hot_start;