Index: runtime/vm/os_macos.cc |
diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc |
index efeb76c81cae39900b3831715a87a93579b6d4f5..a4db52164a90072df4e3fcefada233b751ca4a2e 100644 |
--- a/runtime/vm/os_macos.cc |
+++ b/runtime/vm/os_macos.cc |
@@ -3,7 +3,7 @@ |
// BSD-style license that can be found in the LICENSE file. |
#include "vm/globals.h" |
-#if defined(TARGET_OS_MACOS) |
+#if defined(HOST_OS_MACOS) |
#include "vm/os.h" |
@@ -15,7 +15,7 @@ |
#include <sys/time.h> // NOLINT |
#include <sys/resource.h> // NOLINT |
#include <unistd.h> // NOLINT |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
#include <sys/sysctl.h> // NOLINT |
#include <syslog.h> // NOLINT |
#endif |
@@ -27,7 +27,7 @@ |
namespace dart { |
const char* OS::Name() { |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
return "ios"; |
#else |
return "macos"; |
@@ -90,13 +90,13 @@ int64_t OS::GetCurrentTimeMicros() { |
} |
-#if !TARGET_OS_IOS |
+#if !HOST_OS_IOS |
static mach_timebase_info_data_t timebase_info; |
#endif |
int64_t OS::GetCurrentMonotonicTicks() { |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
// On iOS mach_absolute_time stops while the device is sleeping. Instead use |
// now - KERN_BOOTTIME to get a time difference that is not impacted by clock |
// changes. KERN_BOOTTIME will be updated by the system whenever the system |
@@ -121,27 +121,27 @@ int64_t OS::GetCurrentMonotonicTicks() { |
result *= timebase_info.numer; |
result /= timebase_info.denom; |
return result; |
-#endif // TARGET_OS_IOS |
+#endif // HOST_OS_IOS |
} |
int64_t OS::GetCurrentMonotonicFrequency() { |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
return kMicrosecondsPerSecond; |
#else |
return kNanosecondsPerSecond; |
-#endif // TARGET_OS_IOS |
+#endif // HOST_OS_IOS |
} |
int64_t OS::GetCurrentMonotonicMicros() { |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
ASSERT(GetCurrentMonotonicFrequency() == kMicrosecondsPerSecond); |
return GetCurrentMonotonicTicks(); |
#else |
ASSERT(GetCurrentMonotonicFrequency() == kNanosecondsPerSecond); |
return GetCurrentMonotonicTicks() / kNanosecondsPerMicrosecond; |
-#endif // TARGET_OS_IOS |
+#endif // HOST_OS_IOS |
} |
@@ -167,7 +167,7 @@ int64_t OS::GetCurrentThreadCPUMicros() { |
intptr_t OS::ActivationFrameAlignment() { |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
#if TARGET_ARCH_ARM |
// Even if we generate code that maintains a stronger alignment, we cannot |
// assert the stronger stack alignment because C++ code will not maintain it. |
@@ -183,11 +183,11 @@ intptr_t OS::ActivationFrameAlignment() { |
#else |
#error Unimplemented |
#endif |
-#else // TARGET_OS_IOS |
+#else // HOST_OS_IOS |
// OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI |
// Function Call Guide". |
return 16; |
-#endif // TARGET_OS_IOS |
+#endif // HOST_OS_IOS |
} |
@@ -314,7 +314,7 @@ intptr_t OS::StrNLen(const char* s, intptr_t n) { |
void OS::Print(const char* format, ...) { |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
va_list args; |
va_start(args, format); |
vsyslog(LOG_INFO, format, args); |
@@ -407,7 +407,7 @@ void OS::RegisterCodeObservers() {} |
void OS::PrintErr(const char* format, ...) { |
-#if TARGET_OS_IOS |
+#if HOST_OS_IOS |
va_list args; |
va_start(args, format); |
vsyslog(LOG_ERR, format, args); |
@@ -445,4 +445,4 @@ void OS::Exit(int code) { |
} // namespace dart |
-#endif // defined(TARGET_OS_MACOS) |
+#endif // defined(HOST_OS_MACOS) |