Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: src/include/build_config.h

Issue 788193003: Create a build_config header file. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fixes for mseaborn Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/common.gypi ('k') | src/include/nacl_asm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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)
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_ */
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | src/include/nacl_asm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698