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

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: Support scons windows as well. Created 6 years 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
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 /* TODO(teravest): Remove this guard when builds stop defining these. */
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)
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)
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
76 * once they're defined for the pnacl translator build. */
77
78 #endif /* NATIVE_CLIENT_SRC_INCLUDE_BUILD_CONFIG_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698