Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 The Native Client Authors. All rights reserved. | |
| 3 * Use of this source code is governed by a BSD-style license that can be | |
| 4 * found in the LICENSE file. | |
| 5 */ | |
| 6 | |
| 7 #ifndef NATIVE_CLIENT_SRC_INCLUDE_BUILD_CONFIG_H_ | |
| 8 #define NATIVE_CLIENT_SRC_INCLUDE_BUILD_CONFIG_H_ 1 | |
| 9 | |
| 10 #include "native_client/src/include/nacl_base.h" | |
| 11 | |
| 12 #if !defined(NACL_WINDOWS) && !defined(NACL_LINUX) && !defined(NACL_OSX) && \ | |
| 13 !defined(NACL_ANDROID) | |
| 14 | |
| 15 #if defined(_WIN32) | |
| 16 # define NACL_WINDOWS 1 | |
| 17 #else | |
| 18 # define NACL_WINDOWS 0 | |
| 19 #endif | |
| 20 | |
| 21 #if defined(__linux__) | |
| 22 # define NACL_LINUX 1 | |
| 23 #else | |
| 24 # define NACL_LINUX 0 | |
| 25 #endif | |
| 26 | |
| 27 #if defined(__APPLE__) | |
| 28 # define NACL_OSX 1 | |
| 29 #else | |
| 30 # define NACL_OSX 0 | |
| 31 #endif | |
| 32 | |
| 33 #if defined(ANDROID) | |
| 34 # define NACL_ANDROID 1 | |
| 35 #else | |
| 36 # define NACL_ANDROID 0 | |
| 37 #endif | |
| 38 | |
| 39 #endif | |
| 40 | |
| 41 /* TODO(teravest): Remove this guard when builds stop defining these. */ | |
| 42 #if defined(NACL_BUILD_ARCH) && (NACL_ARCH(NACL_BUILD_ARCH) != NACL_pnacl) && \ | |
| 43 !defined(NACL_BUILD_SUBARCH) | |
|
Mark Seaborn
2015/01/07 20:52:39
Indent to line up with "("
Mark Seaborn
2015/01/07 23:22:33
Oops, sorry, my mistake. I missed the closing ")"
teravest
2015/01/08 17:17:13
Removed the unnecessary parens around:
NACL_ARCH
| |
| 44 # error Please define both NACL_BUILD_ARCH and NACL_BUILD_SUBARCH. | |
| 45 #elif !defined(NACL_BUILD_ARCH) && defined(NACL_BUILD_SUBARCH) | |
| 46 # error Please define both NACL_BUILD_ARCH and NACL_BUILD_SUBARCH. | |
| 47 #endif | |
| 48 | |
| 49 | |
| 50 #if !defined(NACL_BUILD_ARCH) | |
| 51 | |
| 52 #if defined(_M_X64) || defined(__x86_64__) | |
| 53 # define NACL_BUILD_ARCH x86 | |
| 54 # define NACL_BUILD_SUBARCH 64 | |
| 55 #endif | |
| 56 | |
| 57 #if defined(_M_IX86) || defined(__i386__) | |
| 58 # define NACL_BUILD_ARCH x86 | |
| 59 # define NACL_BUILD_SUBARCH 32 | |
| 60 #endif | |
| 61 | |
| 62 #if defined(__ARMEL__) | |
| 63 # define NACL_BUILD_ARCH arm | |
| 64 # define NACL_BUILD_SUBARCH 32 | |
| 65 #endif | |
| 66 | |
| 67 #if defined(__MIPSEL__) | |
| 68 # define NACL_BUILD_ARCH mips | |
| 69 # define NACL_BUILD_SUBARCH 32 | |
| 70 #endif | |
| 71 | |
| 72 #endif /* !defined(NACL_BUILD_ARCH) */ | |
| 73 | |
| 74 /* | |
| 75 * TODO(teravest): Require NACL_BUILD_ARCH and NACL_BUILD_SUBARCH to be defined | |
| 76 * once they're defined for the pnacl translator build. | |
| 77 */ | |
| 78 | |
| 79 #endif /* NATIVE_CLIENT_SRC_INCLUDE_BUILD_CONFIG_H_ */ | |
| OLD | NEW |