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

Side by Side Diff: build/build_config.h

Issue 21401: Eliminate need for build_config.h for OS_* defines. (Closed)
Patch Set: Created 11 years, 10 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
« no previous file with comments | « build/SConscript.main ('k') | build/internal/essential.vsprops » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file adds defines about the platform we're currently building on. 5 // This file adds and checks for defines about the platform we're currently
6 // Operating System: 6 // building on. (The OS_* defines were historically set here, but now they're
7 // part of the build configuration and this file just asserts that they're set.)
8 // Operating System (set by build configuration):
7 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) 9 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
8 // Compiler: 10 // Compiler:
9 // COMPILER_MSVC / COMPILER_GCC 11 // COMPILER_MSVC / COMPILER_GCC
10 // Processor: 12 // Processor:
11 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) 13 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
12 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS 14 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
13 15
14 #ifndef BUILD_BUILD_CONFIG_H_ 16 #ifndef BUILD_BUILD_CONFIG_H_
15 #define BUILD_BUILD_CONFIG_H_ 17 #define BUILD_BUILD_CONFIG_H_
16 18
17 // A set of macros to use for platform detection. 19 // A set of macros to use for platform detection.
18 #if defined(__APPLE__) 20 #if defined(__APPLE__)
19 #define OS_MACOSX 1 21 #ifndef OS_MACOSX 1
22 #error OS_MACOSX should have been set by build files.
23 #endif
20 #elif defined(__linux__) 24 #elif defined(__linux__)
21 #define OS_LINUX 1 25 #ifndef OS_LINUX
26 #error OS_LINUX should have been set by build files.
27 #endif
22 #elif defined(_WIN32) 28 #elif defined(_WIN32)
23 #define OS_WIN 1 29 #ifndef OS_WIN
30 #error OS_WIN should have been set by build files.
31 #endif
24 #else 32 #else
25 #error Please add support for your platform in build/build_config.h 33 #error Please add support for your platform in build/build_config.h
26 #endif 34 #endif
27 35
28 // For access to standard POSIX features, use OS_POSIX instead of a more 36 // For access to standard POSIX features, use OS_POSIX instead of a more
29 // specific macro. 37 // specific macro.
30 #if defined(OS_MACOSX) || defined(OS_LINUX) 38 #if defined(OS_MACOSX) || defined(OS_LINUX)
31 #define OS_POSIX 1 39 #ifndef OS_POSIX
40 #error OS_POSIX should have been set by build files.
41 #endif
32 #endif 42 #endif
33 43
34 // Compiler detection. 44 // Compiler detection.
35 #if defined(__GNUC__) 45 #if defined(__GNUC__)
36 #define COMPILER_GCC 1 46 #define COMPILER_GCC 1
37 #elif defined(_MSC_VER) 47 #elif defined(_MSC_VER)
38 #define COMPILER_MSVC 1 48 #define COMPILER_MSVC 1
39 #else 49 #else
40 #error Please add support for your compiler in build/build_config.h 50 #error Please add support for your compiler in build/build_config.h
41 #endif 51 #endif
(...skipping 18 matching lines...) Expand all
60 #define WCHAR_T_IS_UTF16 70 #define WCHAR_T_IS_UTF16
61 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ 71 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
62 defined(__WCHAR_MAX__) && __WCHAR_MAX__ == 0x7fffffff 72 defined(__WCHAR_MAX__) && __WCHAR_MAX__ == 0x7fffffff
63 #define WCHAR_T_IS_UTF32 73 #define WCHAR_T_IS_UTF32
64 #else 74 #else
65 #error Please add support for your compiler in build/build_config.h 75 #error Please add support for your compiler in build/build_config.h
66 #endif 76 #endif
67 77
68 #endif // BUILD_BUILD_CONFIG_H_ 78 #endif // BUILD_BUILD_CONFIG_H_
69 79
OLDNEW
« no previous file with comments | « build/SConscript.main ('k') | build/internal/essential.vsprops » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698