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 /* TODO(teravest): Remove this guard when builds stop defining these. */ | |
|
Mark Seaborn
2014/12/29 17:51:04
To be more specific, "when the Chromium build stop
teravest
2014/12/29 22:29:28
I've removed this TODO since we might need this gu
| |
| 13 #if !defined(NACL_WINDOWS) && !defined(NACL_LINUX) && !defined(NACL_OSX) | |
| 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 #endif | |
| 34 | |
| 35 #if !defined(NACL_ANDROID) | |
|
Mark Seaborn
2014/12/29 17:51:04
Why is this checked separately from NACL_WINDOWS/L
teravest
2014/12/29 22:29:29
I've lumped this in with the rest.
| |
| 36 # if defined(ANDROID) | |
| 37 # define NACL_ANDROID 1 | |
| 38 # else | |
| 39 # define NACL_ANDROID 0 | |
| 40 # endif | |
| 41 #endif | |
| 42 | |
| 43 /* TODO(teravest): Remove this guard when builds stop defining these. */ | |
| 44 #if defined(NACL_BUILD_ARCH) && (NACL_ARCH(NACL_BUILD_ARCH) != NACL_pnacl) && !d efined(NACL_BUILD_SUBARCH) | |
|
Mark Seaborn
2014/12/29 17:51:04
Line is >80 chars; please wrap
teravest
2014/12/29 22:29:28
Done.
| |
| 45 # error Please define both NACL_BUILD_ARCH and NACL_BUILD_SUBARCH. | |
| 46 #elif !defined(NACL_BUILD_ARCH) && defined(NACL_BUILD_SUBARCH) | |
| 47 # error Please define both NACL_BUILD_ARCH and NACL_BUILD_SUBARCH. | |
| 48 #endif | |
| 49 | |
| 50 | |
| 51 #if !defined(NACL_BUILD_ARCH) | |
| 52 | |
| 53 #if defined(_M_X64) || defined(__x86_64__) | |
| 54 # define NACL_BUILD_ARCH x86 | |
| 55 # define NACL_BUILD_SUBARCH 64 | |
| 56 #endif | |
| 57 | |
| 58 #if defined(_M_IX86) || defined(__i386__) | |
| 59 # define NACL_BUILD_ARCH x86 | |
| 60 # define NACL_BUILD_SUBARCH 32 | |
| 61 #endif | |
| 62 | |
| 63 #if defined(__ARMEL__) | |
| 64 # define NACL_BUILD_ARCH arm | |
| 65 # define NACL_BUILD_SUBARCH 32 | |
| 66 #endif | |
| 67 | |
| 68 #if defined(__MIPSEL__) | |
| 69 # define NACL_BUILD_ARCH mips | |
| 70 # define NACL_BUILD_SUBARCH 32 | |
| 71 #endif | |
| 72 | |
| 73 #endif /* !defined(NACL_BUILD_ARCH) */ | |
| 74 | |
| 75 /* TODO(teravest): Require NACL_BUILD_ARCH and NACL_BUILD_SUBARCH to be defined | |
|
Mark Seaborn
2014/12/29 17:51:04
Nit: Use the NaCl style for multiline comments, wi
teravest
2014/12/29 22:29:28
Done.
| |
| 76 * once they're defined for the pnacl translator build. */ | |
| 77 | |
| 78 #endif /* NATIVE_CLIENT_SRC_INCLUDE_BUILD_CONFIG_H_ */ | |
| OLD | NEW |