OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file adds defines about the platform we're currently building on. | 5 // This file adds defines about the platform we're currently building on. |
6 // Operating System: | 6 // Operating System: |
7 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) / OS_NACL | 7 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) / |
8 // OS_NACL (NACL_SFI or NACL_NONSFI) / OS_NACL_SFI / OS_NACL_NONSFI | |
8 // Compiler: | 9 // Compiler: |
9 // COMPILER_MSVC / COMPILER_GCC | 10 // COMPILER_MSVC / COMPILER_GCC |
10 // Processor: | 11 // Processor: |
11 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) | 12 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) |
12 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS | 13 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS |
13 | 14 |
14 #ifndef BUILD_BUILD_CONFIG_H_ | 15 #ifndef BUILD_BUILD_CONFIG_H_ |
15 #define BUILD_BUILD_CONFIG_H_ | 16 #define BUILD_BUILD_CONFIG_H_ |
16 | 17 |
17 // A set of macros to use for platform detection. | 18 // A set of macros to use for platform detection. |
18 #if defined(__native_client__) | 19 #if defined(__native_client__) |
19 // __native_client__ must be first, so that other OS_ defines are not set. | 20 // __native_client__ must be first, so that other OS_ defines are not set. |
20 #define OS_NACL 1 | 21 #define OS_NACL 1 |
22 // OS_NACL comes in two sandboxing technology flavors, SFI or Non-SFI. | |
23 // See the following document about SFI for more details. | |
24 // https://developer.chrome.com/native-client/reference/sandbox_internals/x86-64 -sandbox | |
Mark Seaborn
2014/10/27 15:53:59
This link isn't very relevant since it doesn't exp
hidehiko
2014/10/28 08:07:21
Done.
| |
25 // PNaCl toolchain defines __native_client_nonsfi__ macro in Non-SFI build | |
26 // mode, while it does not in SFI build mode. | |
27 #if defined(__native_client_nonsfi__) | |
28 #define OS_NACL_NONSFI | |
29 #else | |
30 #define OS_NACL_SFI | |
31 #endif | |
21 #elif defined(ANDROID) | 32 #elif defined(ANDROID) |
22 #define OS_ANDROID 1 | 33 #define OS_ANDROID 1 |
23 #elif defined(__APPLE__) | 34 #elif defined(__APPLE__) |
24 // only include TargetConditions after testing ANDROID as some android builds | 35 // only include TargetConditions after testing ANDROID as some android builds |
25 // on mac don't have this header available and it's not needed unless the target | 36 // on mac don't have this header available and it's not needed unless the target |
26 // is really mac/ios. | 37 // is really mac/ios. |
27 #include <TargetConditionals.h> | 38 #include <TargetConditionals.h> |
28 #define OS_MACOSX 1 | 39 #define OS_MACOSX 1 |
29 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE | 40 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE |
30 #define OS_IOS 1 | 41 #define OS_IOS 1 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 #if defined(OS_ANDROID) | 161 #if defined(OS_ANDROID) |
151 // The compiler thinks std::string::const_iterator and "const char*" are | 162 // The compiler thinks std::string::const_iterator and "const char*" are |
152 // equivalent types. | 163 // equivalent types. |
153 #define STD_STRING_ITERATOR_IS_CHAR_POINTER | 164 #define STD_STRING_ITERATOR_IS_CHAR_POINTER |
154 // The compiler thinks base::string16::const_iterator and "char16*" are | 165 // The compiler thinks base::string16::const_iterator and "char16*" are |
155 // equivalent types. | 166 // equivalent types. |
156 #define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER | 167 #define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER |
157 #endif | 168 #endif |
158 | 169 |
159 #endif // BUILD_BUILD_CONFIG_H_ | 170 #endif // BUILD_BUILD_CONFIG_H_ |
OLD | NEW |