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

Unified Diff: SConstruct

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/untrusted.gypi » ('j') | src/include/checked_cast.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
diff --git a/SConstruct b/SConstruct
index 609af9513043ec432fdf1f8fa1dd7907206b35ed..5b7f5c8f4620bfc4f7b3b0c5f580e8bd2ab05f61 100755
--- a/SConstruct
+++ b/SConstruct
@@ -2142,13 +2142,6 @@ that the given target requires that argument be given."""
pre_base_env.AddMethod(GetAbsDirArg)
-pre_base_env.Append(
- CPPDEFINES = [
- ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ],
- ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ],
- ],
- )
-
def MakeGTestEnv(env):
# Create an environment to run unit tests using Gtest.
gtest_env = env.Clone()
@@ -2450,10 +2443,6 @@ def MakeWindowsEnv(platform=None):
windows_env.Append(
CPPDEFINES = [
- ['NACL_WINDOWS', '1'],
- ['NACL_OSX', '0'],
- ['NACL_LINUX', '0'],
- ['NACL_ANDROID', '0'],
['_WIN32_WINNT', '0x0501'],
['__STDC_LIMIT_MACROS', '1'],
['NOMINMAX', '1'],
@@ -2467,7 +2456,8 @@ def MakeWindowsEnv(platform=None):
LIBS = ['ws2_32', 'advapi32'],
# TODO(bsy) remove 4355 once cross-repo
# NACL_ALLOW_THIS_IN_INITIALIZER_LIST changes go in.
- CCFLAGS = ['/EHsc', '/WX', '/wd4355', '/wd4800'],
+ CCFLAGS = ['/EHsc', '/WX', '/wd4355', '/wd4800', '/FI',
+ '$SOURCE_ROOT/native_client/src/include/build_config.h']
Mark Seaborn 2014/12/19 17:46:19 Can you put '/FI' on the same line as this, to mak
)
# This linker option allows us to ensure our builds are compatible with
@@ -2578,6 +2568,8 @@ def MakeMacEnv(platform=None):
['NACL_OSX', '1'],
['NACL_LINUX', '0'],
['NACL_ANDROID', '0'],
+ ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ],
+ ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ],
# defining _DARWIN_C_SOURCE breaks 10.4
#['_DARWIN_C_SOURCE', '1'],
#['__STDC_LIMIT_MACROS', '1']
@@ -2800,11 +2792,7 @@ def MakeGenericLinuxEnv(platform=None):
# Prepend so we can disable warnings via Append
linux_env.Prepend(
- CPPDEFINES = [['NACL_WINDOWS', '0'],
- ['NACL_OSX', '0'],
- ['NACL_LINUX', '1'],
- ['NACL_ANDROID', '0'],
- ['_DEFAULT_SOURCE', '1'],
+ CPPDEFINES = [['_DEFAULT_SOURCE', '1'],
['_BSD_SOURCE', '1'],
['_POSIX_C_SOURCE', '199506'],
['_XOPEN_SOURCE', '600'],
@@ -3118,6 +3106,8 @@ nacl_env.Append(
['NACL_OSX', '0'],
['NACL_LINUX', '0'],
['NACL_ANDROID', '0'],
+ ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ],
+ ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ],
],
)
@@ -3481,8 +3471,6 @@ def RawSyscallObjects(env, sources):
raw_syscall_env.Append(
CPPDEFINES = [
['USE_RAW_SYSCALLS', '1'],
- ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ],
- ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ],
],
)
objects = []
« no previous file with comments | « no previous file | build/untrusted.gypi » ('j') | src/include/checked_cast.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698