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 | |
|
Mark Seaborn
2014/12/11 16:11:40
Could we call this "build_config.h"? Firstly, to
teravest
2014/12/15 20:08:36
Done.
| |
| 7 #ifndef NATIVE_CLIENT_SRC_INCLUDE_NACL_DEFINES_H_ | |
| 8 #define NATIVE_CLIENT_SRC_INCLUDE_NACL_DEFINES_H_ 1 | |
| 9 | |
| 10 #if !defined(NACL_WINDOWS) && !defined(NACL_LINUX) && !defined(NACL_OSX) | |
|
Mark Seaborn
2014/12/11 16:11:41
Can you add a TODO to remove this when the Gyp bui
teravest
2014/12/15 20:08:36
Done.
| |
| 11 | |
| 12 #if defined(_WIN32) | |
|
Mark Seaborn
2014/12/11 16:11:40
Can you indent like this?
#if defined(_WIN32)
# de
teravest
2014/12/15 20:08:36
Done.
| |
| 13 #define NACL_WINDOWS 1 | |
| 14 #else | |
| 15 #define NACL_WINDOWS 0 | |
| 16 #endif | |
| 17 | |
| 18 #if defined(__linux__) | |
| 19 #define NACL_LINUX 1 | |
| 20 #else | |
| 21 #define NACL_LINUX 0 | |
| 22 #endif | |
| 23 | |
| 24 #if defined(__APPLE__) | |
| 25 #define NACL_OSX 1 | |
| 26 #else | |
| 27 #define NACL_OSX 0 | |
| 28 #endif | |
| 29 | |
| 30 #endif | |
| 31 | |
| 32 #if !defined(NACL_ANDROID) | |
| 33 #if defined(ANDROID) | |
| 34 #define NACL_ANDROID 1 | |
| 35 #else | |
| 36 #define NACL_ANDROID 0 | |
| 37 #endif | |
| 38 #endif | |
| 39 | |
| 40 #if defined(NACL_BUILD_ARCH) && !defined(NACL_BUILD_SUBARCH) | |
|
Mark Seaborn
2014/12/11 16:11:40
Similar TODO for NACL_BUILD_(SUB)ARCH
teravest
2014/12/15 20:08:36
Done.
| |
| 41 #error Please define both NACL_BUILD_ARCH and NACL_BUILD_SUBARCH. | |
| 42 #elif !defined(NACL_BUILD_ARCH) && defined(NACL_BUILD_SUBARCH) | |
| 43 #error Please define both NACL_BUILD_ARCH and NACL_BUILD_SUBARCH. | |
| 44 #endif | |
| 45 | |
| 46 | |
| 47 #if !defined(NACL_BUILD_ARCH) | |
| 48 | |
| 49 #if defined(_M_X64) || defined(__x86_64__) | |
| 50 #define NACL_BUILD_ARCH x86 | |
| 51 #define NACL_BUILD_SUBARCH 64 | |
| 52 #endif | |
| 53 | |
| 54 #if defined(_M_IX86) || defined(__i386__) | |
| 55 #define NACL_BUILD_ARCH x86 | |
| 56 #define NACL_BUILD_SUBARCH 32 | |
| 57 #endif | |
| 58 | |
| 59 /* TODO(teravest): Handle __aarch64__? */ | |
|
Mark Seaborn
2014/12/11 16:11:41
This TODO is not really needed since we don't supp
teravest
2014/12/15 20:08:36
Removed.
| |
| 60 #if defined(__ARMEL__) | |
| 61 #define NACL_BUILD_ARCH arm | |
| 62 #define NACL_BUILD_SUBARCH 32 | |
| 63 #endif | |
| 64 | |
| 65 #if defined((__MIPSEL__) | |
|
Mark Seaborn
2014/12/11 16:11:40
Stray extra "(" here
teravest
2014/12/15 20:08:36
Done.
| |
| 66 #define NACL_BUILD_ARCH mips | |
| 67 #define NACL_BUILD_SUBARCH 32 | |
| 68 #endif | |
| 69 | |
| 70 #endif /* !defined(NACL_BUILD_ARCH) */ | |
| 71 | |
| 72 #if !defined(NACL_BUILD_ARCH) | |
| 73 #error NACL_BUILD_ARCH not defined. | |
| 74 #endif | |
| 75 | |
| 76 #if !defined(NACL_BUILD_SUBARCH) | |
| 77 #error NACL_BUILD_SUBARCH not defined. | |
| 78 #endif | |
| 79 | |
| 80 #endif /* NATIVE_CLIENT_SRC_PUBLIC_NACL_DEFINES_H_ */ | |
| OLD | NEW |