Rename TARGET_OS_* to HOST_OS_*.

Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.

Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2750843003 .
This commit is contained in:
Ryan Macnak 2017-03-15 13:11:05 -07:00
parent ef79634132
commit 877284947b
154 changed files with 386 additions and 386 deletions

2
DEPS
View file

@ -95,7 +95,7 @@ vars = {
"pub_semver_tag": "@1.3.2",
"quiver_tag": "@0.22.0",
"resource_rev":"@a49101ba2deb29c728acba6fb86000a8f730f4b1",
"root_certificates_rev": "@0068d8911140e591ebb750af296e81940a9906f5",
"root_certificates_rev": "@a4c7c6f23a664a37bc1b6f15a819e3f2a292791a",
"scheduled_test_tag": "@0.12.9",
"shelf_static_tag": "@0.2.4",
"shelf_packages_handler_tag": "@1.0.0",

View file

@ -4,7 +4,7 @@
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOSX)
#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOSX)
#if defined(__has_feature)
#if __has_feature(address_sanitizer)
@ -23,4 +23,4 @@ __asan_default_options() {
#endif // __has_feature(address_sanitizer)
#endif // defined(__has_feature)
#endif // defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOSX)
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_MACOSX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
@ -41,4 +41,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/crypto.h"
@ -31,4 +31,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
@ -41,4 +41,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
@ -41,4 +41,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -7,7 +7,7 @@
#endif
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/crypto.h"
@ -32,4 +32,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -94,11 +94,11 @@ bool TryReadKernel(const char* script_uri,
static bool IsWindowsHost() {
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
return true;
#else // defined(TARGET_OS_WINDOWS)
#else // defined(HOST_OS_WINDOWS)
return false;
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)
}

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/directory.h"
@ -482,4 +482,4 @@ bool Directory::Rename(const char* path, const char* new_path) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/directory.h"
@ -431,4 +431,4 @@ bool Directory::Rename(const char* path, const char* new_path) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/directory.h"
@ -486,4 +486,4 @@ bool Directory::Rename(const char* path, const char* new_path) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/directory.h"
@ -477,4 +477,4 @@ bool Directory::Rename(const char* path, const char* new_path) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/directory.h"
#include "bin/file.h"
@ -510,4 +510,4 @@ bool Directory::Rename(const char* path, const char* new_path) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -605,15 +605,15 @@ class DescriptorInfoMultipleMixin : public DI {
} // namespace dart
// The event handler delegation class is OS specific.
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/eventhandler_android.h"
#elif defined(TARGET_OS_FUCHSIA)
#elif defined(HOST_OS_FUCHSIA)
#include "bin/eventhandler_fuchsia.h"
#elif defined(TARGET_OS_LINUX)
#elif defined(HOST_OS_LINUX)
#include "bin/eventhandler_linux.h"
#elif defined(TARGET_OS_MACOS)
#elif defined(HOST_OS_MACOS)
#include "bin/eventhandler_macos.h"
#elif defined(TARGET_OS_WINDOWS)
#elif defined(HOST_OS_WINDOWS)
#include "bin/eventhandler_win.h"
#else
#error Unknown target os.

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/eventhandler.h"
#include "bin/eventhandler_android.h"
@ -444,6 +444,6 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/eventhandler.h"
#include "bin/eventhandler_fuchsia.h"
@ -506,6 +506,6 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/eventhandler.h"
#include "bin/eventhandler_linux.h"
@ -441,6 +441,6 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/eventhandler.h"
#include "bin/eventhandler_macos.h"
@ -508,6 +508,6 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/eventhandler.h"
#include "bin/eventhandler_win.h"
@ -1460,6 +1460,6 @@ void EventHandlerImplementation::Shutdown() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/extensions.h"
#include <dlfcn.h> // NOLINT
@ -48,4 +48,4 @@ Dart_Handle Extensions::GetError() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/extensions.h"
#include <dlfcn.h> // NOLINT
@ -48,4 +48,4 @@ Dart_Handle Extensions::GetError() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/extensions.h"
#include <dlfcn.h> // NOLINT
@ -48,4 +48,4 @@ Dart_Handle Extensions::GetError() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/extensions.h"
#include <dlfcn.h> // NOLINT
@ -48,4 +48,4 @@ Dart_Handle Extensions::GetError() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/extensions.h"
#include "bin/utils.h"
@ -59,4 +59,4 @@ Dart_Handle Extensions::GetError() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/fdutils.h"
@ -147,4 +147,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/fdutils.h"
@ -147,4 +147,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/fdutils.h"
@ -147,4 +147,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/fdutils.h"
@ -147,4 +147,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/file.h"
@ -608,4 +608,4 @@ File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/file.h"
@ -583,4 +583,4 @@ File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/file.h"
@ -620,4 +620,4 @@ File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/file.h"
@ -582,4 +582,4 @@ File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/file_system_watcher.h"
@ -146,6 +146,6 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/file_system_watcher.h"
@ -55,6 +55,6 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/file_system_watcher.h"
@ -147,6 +147,6 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,11 +5,11 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/file_system_watcher.h"
#if !TARGET_OS_IOS
#if !HOST_OS_IOS
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
@ -397,7 +397,7 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
} // namespace bin
} // namespace dart
#else // !TARGET_OS_IOS
#else // !HOST_OS_IOS
namespace dart {
namespace bin {
@ -439,7 +439,7 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
} // namespace bin
} // namespace dart
#endif // !TARGET_OS_IOS
#endif // defined(TARGET_OS_MACOS)
#endif // !HOST_OS_IOS
#endif // defined(HOST_OS_MACOS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/file_system_watcher.h"
@ -135,6 +135,6 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/file.h"
@ -831,4 +831,4 @@ File::Identical File::AreIdentical(const char* file_1, const char* file_2) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/log.h"
@ -37,4 +37,4 @@ void Log::VPrintErr(const char* format, va_list args) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/log.h"
@ -25,4 +25,4 @@ void Log::VPrintErr(const char* format, va_list args) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/log.h"
@ -25,4 +25,4 @@ void Log::VPrintErr(const char* format, va_list args) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/log.h"
@ -25,4 +25,4 @@ void Log::VPrintErr(const char* format, va_list args) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/log.h"
@ -25,4 +25,4 @@ void Log::VPrintErr(const char* format, va_list args) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -491,7 +491,7 @@ static bool ProcessShortSocketWriteOption(const char* arg,
}
#if !defined(TARGET_OS_MACOS)
#if !defined(HOST_OS_MACOS)
extern const char* commandline_root_certs_file;
extern const char* commandline_root_certs_cache;
@ -527,7 +527,7 @@ static bool ProcessRootCertsCacheOption(const char* arg,
commandline_root_certs_cache = arg;
return true;
}
#endif // !defined(TARGET_OS_MACOS)
#endif // !defined(HOST_OS_MACOS)
static struct {
@ -561,10 +561,10 @@ static struct {
{"--hot-reload-rollback-test-mode", ProcessHotReloadRollbackTestModeOption},
{"--short_socket_read", ProcessShortSocketReadOption},
{"--short_socket_write", ProcessShortSocketWriteOption},
#if !defined(TARGET_OS_MACOS)
#if !defined(HOST_OS_MACOS)
{"--root-certs-file=", ProcessRootCertsFileOption},
{"--root-certs-cache=", ProcessRootCertsCacheOption},
#endif // !defined(TARGET_OS_MACOS)
#endif // !defined(HOST_OS_MACOS)
{NULL, NULL}};
@ -1116,7 +1116,7 @@ static void PrintUsage() {
"--enable-vm-service[=<port>[/<bind-address>]]\n"
" enables the VM service and listens on specified port for connections\n"
" (default port number is 8181, default bind address is localhost).\n"
#if !defined(TARGET_OS_MACOS)
#if !defined(HOST_OS_MACOS)
"\n"
"--root-certs-file=<path>\n"
" The path to a file containing the trusted root certificates to use for\n"
@ -1124,7 +1124,7 @@ static void PrintUsage() {
"--root-certs-cache=<path>\n"
" The path to a cache directory containing the trusted root certificates to\n"
" use for secure socket connections.\n"
#endif // !defined(TARGET_OS_MACOS)
#endif // !defined(HOST_OS_MACOS)
"\n"
"The following options are only used for VM development and may\n"
"be changed in any future version:\n");

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/platform.h"
@ -97,4 +97,4 @@ void Platform::Exit(int exit_code) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/platform.h"
@ -121,4 +121,4 @@ void Platform::Exit(int exit_code) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/platform.h"
@ -122,4 +122,4 @@ void Platform::Exit(int exit_code) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,13 +3,13 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/platform.h"
#if !TARGET_OS_IOS
#if !HOST_OS_IOS
#include <crt_externs.h> // NOLINT
#endif // !TARGET_OS_IOS
#endif // !HOST_OS_IOS
#include <mach-o/dyld.h>
#include <signal.h> // NOLINT
#include <string.h> // NOLINT
@ -80,7 +80,7 @@ int Platform::NumberOfProcessors() {
const char* Platform::OperatingSystem() {
#if TARGET_OS_IOS
#if HOST_OS_IOS
return "ios";
#else
return "macos";
@ -104,7 +104,7 @@ bool Platform::LocalHostname(char* buffer, intptr_t buffer_length) {
char** Platform::Environment(intptr_t* count) {
#if TARGET_OS_IOS
#if HOST_OS_IOS
// TODO(zra,chinmaygarde): On iOS, environment variables are seldom used. Wire
// this up if someone needs it. In the meantime, we return an empty array.
char** result;
@ -166,4 +166,4 @@ void Platform::Exit(int exit_code) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/platform.h"
@ -294,4 +294,4 @@ void Platform::Exit(int exit_code) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -12,7 +12,7 @@
#include "bin/lockers.h"
#include "bin/thread.h"
#include "platform/globals.h"
#if !defined(TARGET_OS_WINDOWS)
#if !defined(HOST_OS_WINDOWS)
#include "platform/signal_blocker.h"
#endif
#include "platform/utils.h"
@ -322,8 +322,8 @@ class BufferListBase {
DISALLOW_COPY_AND_ASSIGN(BufferListBase);
};
#if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_FUCHSIA) || \
defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS)
#if defined(HOST_OS_ANDROID) || defined(HOST_OS_FUCHSIA) || \
defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS)
class BufferList : public BufferListBase {
public:
BufferList() {}
@ -340,13 +340,13 @@ class BufferList : public BufferListBase {
ASSERT(free_size() > 0);
ASSERT(free_size() <= kBufferSize);
intptr_t block_size = dart::Utils::Minimum(free_size(), available);
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
intptr_t bytes = NO_RETRY_EXPECTED(
read(fd, reinterpret_cast<void*>(FreeSpaceAddress()), block_size));
#else
intptr_t bytes = TEMP_FAILURE_RETRY(
read(fd, reinterpret_cast<void*>(FreeSpaceAddress()), block_size));
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)
if (bytes < 0) {
return false;
}
@ -360,7 +360,7 @@ class BufferList : public BufferListBase {
private:
DISALLOW_COPY_AND_ASSIGN(BufferList);
};
#endif // defined(TARGET_OS_ANDROID) ...
#endif // defined(HOST_OS_ANDROID) ...
} // namespace bin
} // namespace dart

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/process.h"
@ -1000,6 +1000,6 @@ void Process::ClearSignalHandler(intptr_t signal) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/process.h"
@ -820,6 +820,6 @@ void Process::ClearSignalHandler(intptr_t signal) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/process.h"
@ -997,6 +997,6 @@ void Process::ClearSignalHandler(intptr_t signal) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,11 +5,11 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/process.h"
#if !TARGET_OS_IOS
#if !HOST_OS_IOS
#include <crt_externs.h> // NOLINT
#endif
#include <errno.h> // NOLINT
@ -465,7 +465,7 @@ class ProcessStarter {
ReportChildError();
}
#if !TARGET_OS_IOS
#if !HOST_OS_IOS
if (program_environment_ != NULL) {
// On MacOS you have to do a bit of magic to get to the
// environment strings.
@ -1090,6 +1090,6 @@ void Process::ClearSignalHandler(intptr_t signal) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/process.h"
@ -1045,6 +1045,6 @@ void Process::ClearSignalHandler(intptr_t signal) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS) || defined(TARGET_OS_ANDROID) || \
#if defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID) || \
defined(DART_IO_ROOT_CERTS_DISABLED)
namespace dart {
@ -17,7 +17,7 @@ unsigned int root_certificates_pem_length = 0;
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS) || defined(TARGET_OS_ANDROID) || ...
#endif // defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID) || ...
#endif // !defined(DART_IO_DISABLED) &&
// !defined(DART_IO_SECURE_SOCKET_DISABLED)

View file

@ -10,15 +10,15 @@
#endif
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_LINUX) || \
defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_ANDROID) || defined(HOST_OS_LINUX) || \
defined(HOST_OS_WINDOWS) || defined(HOST_OS_FUCHSIA)
#include "bin/secure_socket_boringssl.h"
#elif defined(TARGET_OS_MACOS)
#if TARGET_OS_IOS
#elif defined(HOST_OS_MACOS)
#if HOST_OS_IOS
#include "bin/secure_socket_ios.h"
#else // TARGET_OS_IOS
#else // HOST_OS_IOS
#include "bin/secure_socket_macos.h"
#endif // TARGET_OS_IOS
#endif // HOST_OS_IOS
#else
#error Unknown target os.
#endif

View file

@ -5,8 +5,8 @@
#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_LINUX) || \
defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_ANDROID) || defined(HOST_OS_LINUX) || \
defined(HOST_OS_WINDOWS) || defined(HOST_OS_FUCHSIA)
#include "bin/secure_socket.h"
#include "bin/secure_socket_boringssl.h"
@ -872,7 +872,7 @@ void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
return;
}
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
// On Android, we don't compile in the trusted root certificates. Insead,
// we use the directory of trusted certificates already present on the device.
// This saves ~240KB from the size of the binary. This has the drawback that
@ -883,7 +883,7 @@ void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
const char* android_cacerts = "/system/etc/security/cacerts";
LoadRootCertCache(context, android_cacerts);
return;
#elif defined(TARGET_OS_LINUX)
#elif defined(HOST_OS_LINUX)
// On Linux, we use the compiled-in trusted certs as a last resort. First,
// we try to find the trusted certs in various standard locations. A good
// discussion of the complexities of this endeavor can be found here:
@ -900,7 +900,7 @@ void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
LoadRootCertCache(context, cachedir);
return;
}
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)
// Fall back on the compiled-in certs if the standard locations don't exist,
// or we aren't on Linux.
@ -1799,7 +1799,7 @@ int SSLFilter::ProcessWriteEncryptedBuffer(int start, int end) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)
#endif // !defined(DART_IO_DISABLED) &&
// !defined(DART_IO_SECURE_SOCKET_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
#include "platform/globals.h"
#if TARGET_OS_IOS
#if HOST_OS_IOS
#include "bin/secure_socket.h"
#include "bin/secure_socket_ios.h"
@ -1502,6 +1502,6 @@ OSStatus SSLFilter::ProcessWritePlaintextBuffer(intptr_t start,
} // namespace bin
} // namespace dart
#endif // TARGET_OS_IOS
#endif // HOST_OS_IOS
#endif // !defined(DART_IO_SECURE_SOCKET_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS) && !TARGET_OS_IOS
#if defined(HOST_OS_MACOS) && !HOST_OS_IOS
#include "bin/secure_socket.h"
#include "bin/secure_socket_macos.h"
@ -1809,7 +1809,7 @@ OSStatus SSLFilter::ProcessWritePlaintextBuffer(intptr_t start,
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS) && !TARGET_OS_IOS
#endif // defined(HOST_OS_MACOS) && !HOST_OS_IOS
#endif // !defined(DART_IO_DISABLED) &&
// !defined(DART_IO_SECURE_SOCKET_DISABLED)

View file

@ -11,15 +11,15 @@
#include "platform/globals.h"
// Declare the OS-specific types ahead of defining the generic class.
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/socket_android.h"
#elif defined(TARGET_OS_FUCHSIA)
#elif defined(HOST_OS_FUCHSIA)
#include "bin/socket_fuchsia.h"
#elif defined(TARGET_OS_LINUX)
#elif defined(HOST_OS_LINUX)
#include "bin/socket_linux.h"
#elif defined(TARGET_OS_MACOS)
#elif defined(HOST_OS_MACOS)
#include "bin/socket_macos.h"
#elif defined(TARGET_OS_WINDOWS)
#elif defined(HOST_OS_WINDOWS)
#include "bin/socket_win.h"
#else
#error Unknown target os.

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/socket.h"
#include "bin/socket_android.h"
@ -580,6 +580,6 @@ bool Socket::LeaveMulticast(intptr_t fd,
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/socket.h"
#include "bin/socket_fuchsia.h"
@ -534,6 +534,6 @@ bool Socket::LeaveMulticast(intptr_t fd,
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/socket.h"
#include "bin/socket_linux.h"
@ -599,6 +599,6 @@ bool Socket::LeaveMulticast(intptr_t fd,
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/socket.h"
#include "bin/socket_macos.h"
@ -628,6 +628,6 @@ bool Socket::LeaveMulticast(intptr_t fd,
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/socket.h"
#include "bin/socket_win.h"
@ -668,6 +668,6 @@ bool Socket::LeaveMulticast(intptr_t fd,
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/stdio.h"
@ -97,6 +97,6 @@ bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/stdio.h"
@ -50,6 +50,6 @@ bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/stdio.h"
@ -97,6 +97,6 @@ bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/stdio.h"
@ -97,6 +97,6 @@ bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -5,7 +5,7 @@
#if !defined(DART_IO_DISABLED)
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/stdio.h"
@ -96,6 +96,6 @@ bool Stdout::GetTerminalSize(intptr_t fd, int size[2]) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)
#endif // !defined(DART_IO_DISABLED)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#define WIN32_LEAN_AND_MEAN
#include <windows.h> // NOLINT
@ -12,4 +12,4 @@ BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
return true;
}
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -16,15 +16,15 @@ class Monitor;
}
// Declare the OS-specific types ahead of defining the generic classes.
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/thread_android.h"
#elif defined(TARGET_OS_FUCHSIA)
#elif defined(HOST_OS_FUCHSIA)
#include "bin/thread_fuchsia.h"
#elif defined(TARGET_OS_LINUX)
#elif defined(HOST_OS_LINUX)
#include "bin/thread_linux.h"
#elif defined(TARGET_OS_MACOS)
#elif defined(HOST_OS_MACOS)
#include "bin/thread_macos.h"
#elif defined(TARGET_OS_WINDOWS)
#elif defined(HOST_OS_WINDOWS)
#include "bin/thread_win.h"
#else
#error Unknown target os.

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "bin/thread.h"
#include "bin/thread_android.h"
@ -318,4 +318,4 @@ void Monitor::NotifyAll() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include "bin/thread.h"
#include "bin/thread_fuchsia.h"
@ -321,4 +321,4 @@ void Monitor::NotifyAll() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include "bin/thread.h"
#include "bin/thread_linux.h"
@ -321,4 +321,4 @@ void Monitor::NotifyAll() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include "bin/thread.h"
#include "bin/thread_macos.h"
@ -313,4 +313,4 @@ void Monitor::NotifyAll() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "bin/thread.h"
#include "bin/thread_win.h"
@ -405,4 +405,4 @@ void Monitor::NotifyAll() {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include <errno.h> // NOLINT
#include <netdb.h> // NOLINT
@ -131,4 +131,4 @@ void TimerUtils::Sleep(int64_t millis) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_ANDROID)
#endif // defined(HOST_OS_ANDROID)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
#include <errno.h>
#include <magenta/syscalls.h>
@ -104,4 +104,4 @@ void TimerUtils::Sleep(int64_t millis) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_FUCHSIA)
#endif // defined(HOST_OS_FUCHSIA)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_LINUX)
#if defined(HOST_OS_LINUX)
#include <errno.h> // NOLINT
#include <netdb.h> // NOLINT
@ -129,4 +129,4 @@ void TimerUtils::Sleep(int64_t millis) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_LINUX)
#endif // defined(HOST_OS_LINUX)

View file

@ -3,14 +3,14 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
#include <errno.h> // NOLINT
#include <mach/clock.h> // NOLINT
#include <mach/mach.h> // NOLINT
#include <mach/mach_time.h> // NOLINT
#include <netdb.h> // NOLINT
#if TARGET_OS_IOS
#if HOST_OS_IOS
#include <sys/sysctl.h> // NOLINT
#endif
#include <sys/time.h> // NOLINT
@ -124,7 +124,7 @@ int64_t TimerUtils::GetCurrentMonotonicMillis() {
}
#if TARGET_OS_IOS
#if HOST_OS_IOS
static int64_t GetCurrentTimeMicros() {
// gettimeofday has microsecond resolution.
struct timeval tv;
@ -134,11 +134,11 @@ static int64_t GetCurrentTimeMicros() {
}
return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
}
#endif // TARGET_OS_IOS
#endif // HOST_OS_IOS
int64_t TimerUtils::GetCurrentMonotonicMicros() {
#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
@ -160,7 +160,7 @@ int64_t TimerUtils::GetCurrentMonotonicMicros() {
result *= timebase_info.numer;
result /= timebase_info.denom;
return result;
#endif // TARGET_OS_IOS
#endif // HOST_OS_IOS
}
@ -188,4 +188,4 @@ void TimerUtils::Sleep(int64_t millis) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
#endif // defined(HOST_OS_MACOS)

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include <errno.h> // NOLINT
#include <time.h> // NOLINT
@ -260,4 +260,4 @@ void TimerUtils::Sleep(int64_t millis) {
} // namespace bin
} // namespace dart
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -238,7 +238,7 @@ bool VmService::Setup(const char* server_ip,
Dart_NewBoolean(dev_mode_server));
// Are we running on Windows?
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
Dart_Handle is_windows = Dart_True();
#else
Dart_Handle is_windows = Dart_False();
@ -248,7 +248,7 @@ bool VmService::Setup(const char* server_ip,
SHUTDOWN_ON_ERROR(result);
// Are we running on Fuchsia?
#if defined(TARGET_OS_FUCHSIA)
#if defined(HOST_OS_FUCHSIA)
Dart_Handle is_fuchsia = Dart_True();
#else
Dart_Handle is_fuchsia = Dart_False();

View file

@ -198,7 +198,7 @@ DEFINE_NATIVE_ENTRY(Double_truncate, 1) {
}
#if defined(TARGET_OS_MACOS)
#if defined(HOST_OS_MACOS)
// MAC OSX math library produces old style cast warning.
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif

View file

@ -9,7 +9,7 @@
namespace dart {
DEFINE_NATIVE_ENTRY(Uri_isWindowsPlatform, 0) {
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
return Bool::True().raw();
#else
return Bool::False().raw();

View file

@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#include "platform/floating_point_win.h"
@ -46,4 +46,4 @@ double atan2_ieee(double x, double y) {
}
}
#endif // defined(TARGET_OS_WINDOWS)
#endif // defined(HOST_OS_WINDOWS)

View file

@ -87,36 +87,36 @@
#if defined(__ANDROID__)
// Check for Android first, to determine its difference from Linux.
#define TARGET_OS_ANDROID 1
#define HOST_OS_ANDROID 1
#elif defined(__linux__) || defined(__FreeBSD__)
// Generic Linux.
#define TARGET_OS_LINUX 1
#define HOST_OS_LINUX 1
#elif defined(__APPLE__)
// Define the flavor of Mac OS we are running on.
#include <TargetConditionals.h>
// TODO(iposva): Rename TARGET_OS_MACOS to TARGET_OS_MAC to inherit
// TODO(iposva): Rename HOST_OS_MACOS to HOST_OS_MAC to inherit
// the value defined in TargetConditionals.h
#define TARGET_OS_MACOS 1
#define HOST_OS_MACOS 1
#if TARGET_OS_IPHONE
// Test for this #define by saying '#if TARGET_OS_IOS' rather than the usual
// '#if defined(TARGET_OS_IOS)'. TARGET_OS_IOS is defined to be 0 in
// XCode >= 7.0. See Issue #24453.
#define TARGET_OS_IOS 1
#define HOST_OS_IOS 1
#endif
#elif defined(_WIN32)
// Windows, both 32- and 64-bit, regardless of the check for _WIN32.
#define TARGET_OS_WINDOWS 1
#define HOST_OS_WINDOWS 1
#elif defined(__Fuchsia__)
#define TARGET_OS_FUCHSIA
#define HOST_OS_FUCHSIA
#elif !defined(TARGET_OS_FUCHSIA)
#elif !defined(HOST_OS_FUCHSIA)
#error Automatic target os detection failed.
#endif
@ -388,7 +388,7 @@ typedef simd128_value_t fpu_register_t;
#if defined(TARGET_ABI_IOS) && defined(TARGET_ABI_EABI)
#error Both TARGET_ABI_IOS and TARGET_ABI_EABI defined.
#elif !defined(TARGET_ABI_IOS) && !defined(TARGET_ABI_EABI)
#if defined(TARGET_OS_MAC)
#if defined(HOST_OS_MAC)
#define TARGET_ABI_IOS 1
#else
#define TARGET_ABI_EABI 1
@ -672,21 +672,21 @@ static inline T ReadUnaligned(const T* ptr) {
// On Windows the reentrent version of strtok is called
// strtok_s. Unify on the posix name strtok_r.
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#define snprintf _snprintf
#define strtok_r strtok_s
#endif
#if !defined(TARGET_OS_WINDOWS)
#if !defined(HOST_OS_WINDOWS)
#if defined(TEMP_FAILURE_RETRY)
// TEMP_FAILURE_RETRY is defined in unistd.h on some platforms. We should
// not use that version, but instead the one in signal_blocker.h, to ensure
// we disable signal interrupts.
#undef TEMP_FAILURE_RETRY
#endif // defined(TEMP_FAILURE_RETRY)
#endif // !defined(TARGET_OS_WINDOWS)
#endif // !defined(HOST_OS_WINDOWS)
#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS)
#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS)
// Tell the compiler to do printf format string checking if the
// compiler supports it; see the 'format' attribute in
// <http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Attributes.html>.

View file

@ -8,7 +8,7 @@
// We must take these math functions from the C++ header file as long as we
// are using the STL. Otherwise the Android build will break due to confusion
// between C++ and C headers when math.h is also included.
#if !defined(TARGET_OS_FUCHSIA)
#if !defined(HOST_OS_FUCHSIA)
#include <cmath>
#define isinf(val) std::isinf(val)

View file

@ -8,7 +8,7 @@
#include "platform/globals.h"
#include "platform/assert.h"
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
#error Do not include this file on Windows.
#endif

View file

@ -208,15 +208,15 @@ class Utils {
} // namespace dart
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "platform/utils_android.h"
#elif defined(TARGET_OS_FUCHSIA)
#elif defined(HOST_OS_FUCHSIA)
#include "platform/utils_fuchsia.h"
#elif defined(TARGET_OS_LINUX)
#elif defined(HOST_OS_LINUX)
#include "platform/utils_linux.h"
#elif defined(TARGET_OS_MACOS)
#elif defined(HOST_OS_MACOS)
#include "platform/utils_macos.h"
#elif defined(TARGET_OS_WINDOWS)
#elif defined(HOST_OS_WINDOWS)
#include "platform/utils_win.h"
#else
#error Unknown target os.

View file

@ -15,7 +15,7 @@
// An extra check since we are assuming the existence of /proc/cpuinfo below.
#if !defined(USING_SIMULATOR) && !defined(__linux__) && !defined(ANDROID) && \
!TARGET_OS_IOS
!HOST_OS_IOS
#error ARM cross-compile only supported on Linux
#endif

View file

@ -3413,7 +3413,7 @@ ASSEMBLER_TEST_RUN(DoubleToDoubleTrunc, test) {
ASSEMBLER_TEST_GENERATE(DoubleAbs, assembler) {
EnterTestFrame(assembler);
#if defined(TARGET_OS_WINDOWS)
#if defined(HOST_OS_WINDOWS)
// First argument is code object, second argument is thread. MSVC passes
// third argument in XMM2.
__ DoubleAbs(XMM2);

View file

@ -73,15 +73,15 @@ class AtomicOperations : public AllStatic {
#include "vm/atomic_simulator.h"
#endif
#if defined(TARGET_OS_ANDROID)
#if defined(HOST_OS_ANDROID)
#include "vm/atomic_android.h"
#elif defined(TARGET_OS_FUCHSIA)
#elif defined(HOST_OS_FUCHSIA)
#include "vm/atomic_fuchsia.h"
#elif defined(TARGET_OS_LINUX)
#elif defined(HOST_OS_LINUX)
#include "vm/atomic_linux.h"
#elif defined(TARGET_OS_MACOS)
#elif defined(HOST_OS_MACOS)
#include "vm/atomic_macos.h"
#elif defined(TARGET_OS_WINDOWS)
#elif defined(HOST_OS_WINDOWS)
#include "vm/atomic_win.h"
#else
#error Unknown target os.

View file

@ -9,7 +9,7 @@
#error Do not include atomic_android.h directly. Use atomic.h instead.
#endif
#if !defined(TARGET_OS_ANDROID)
#if !defined(HOST_OS_ANDROID)
#error This file should only be included on Android builds.
#endif

View file

@ -9,7 +9,7 @@
#error Do not include atomic_fuchsia.h directly. Use atomic.h instead.
#endif
#if !defined(TARGET_OS_FUCHSIA)
#if !defined(HOST_OS_FUCHSIA)
#error This file should only be included on Fuchsia builds.
#endif

View file

@ -9,7 +9,7 @@
#error Do not include atomic_linux.h directly. Use atomic.h instead.
#endif
#if !defined(TARGET_OS_LINUX)
#if !defined(HOST_OS_LINUX)
#error This file should only be included on Linux builds.
#endif

View file

@ -9,7 +9,7 @@
#error Do not include atomic_macos.h directly. Use atomic.h instead.
#endif
#if !defined(TARGET_OS_MACOS)
#if !defined(HOST_OS_MACOS)
#error This file should only be included on Mac OS X builds.
#endif

View file

@ -9,7 +9,7 @@
#error Do not include atomic_win.h directly. Use atomic.h instead.
#endif
#if !defined(TARGET_OS_WINDOWS)
#if !defined(HOST_OS_WINDOWS)
#error This file should only be included on Windows builds.
#endif

View file

@ -90,12 +90,12 @@ DEFINE_FLAG(bool, sim_use_hardfp, true, "Use the softfp ABI.");
#endif
void CPU::FlushICache(uword start, uword size) {
#if TARGET_OS_IOS
#if HOST_OS_IOS
// Precompilation never patches code so there should be no I cache flushes.
UNREACHABLE();
#endif
#if !defined(USING_SIMULATOR) && !TARGET_OS_IOS
#if !defined(USING_SIMULATOR) && !HOST_OS_IOS
// Nothing to do. Flushing no instructions.
if (size == 0) {
return;
@ -140,7 +140,7 @@ bool HostCPUFeatures::initialized_ = false;
#if !defined(USING_SIMULATOR)
#if TARGET_OS_IOS
#if HOST_OS_IOS
void HostCPUFeatures::InitOnce() {
// TODO(24743): Actually check the CPU features and fail if we're missing
// something assumed in a precompiled snapshot.
@ -158,7 +158,7 @@ void HostCPUFeatures::InitOnce() {
initialized_ = true;
#endif
}
#else // TARGET_OS_IOS
#else // HOST_OS_IOS
void HostCPUFeatures::InitOnce() {
bool is_arm64 = false;
CpuInfo::InitOnce();
@ -238,7 +238,7 @@ void HostCPUFeatures::InitOnce() {
initialized_ = true;
#endif
}
#endif // TARGET_OS_IOS
#endif // HOST_OS_IOS
void HostCPUFeatures::Cleanup() {
DEBUG_ASSERT(initialized_);

Some files were not shown because too many files have changed in this diff Show more