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

Side by Side 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: 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
« no previous file with comments | « no previous file | src/include/atomic_ops.h » ('j') | src/include/nacl_defines.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! -*- python -*- 1 #! -*- python -*-
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import atexit 6 import atexit
7 import json 7 import json
8 import os 8 import os
9 import platform 9 import platform
10 import re 10 import re
(...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 dir = ARGUMENTS.get(argument) 2136 dir = ARGUMENTS.get(argument)
2137 if not dir: 2137 if not dir:
2138 raise UserError('%s must be set when invoking %s' % (argument, target)) 2138 raise UserError('%s must be set when invoking %s' % (argument, target))
2139 return os.path.join(env.Dir('$MAIN_DIR').abspath, dir) 2139 return os.path.join(env.Dir('$MAIN_DIR').abspath, dir)
2140 2140
2141 pre_base_env.AddMethod(GetAbsDirArg) 2141 pre_base_env.AddMethod(GetAbsDirArg)
2142 2142
2143 2143
2144 pre_base_env.Append( 2144 pre_base_env.Append(
2145 CPPDEFINES = [ 2145 CPPDEFINES = [
2146 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ], 2146 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ],
Mark Seaborn 2014/12/11 16:11:40 Remove these?
teravest 2014/12/15 20:08:36 Done.
2147 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ], 2147 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ],
2148 ], 2148 ],
2149 ) 2149 )
2150 2150
2151 def MakeGTestEnv(env): 2151 def MakeGTestEnv(env):
2152 # Create an environment to run unit tests using Gtest. 2152 # Create an environment to run unit tests using Gtest.
2153 gtest_env = env.Clone() 2153 gtest_env = env.Clone()
2154 2154
2155 # This became necessary for the arm cross TC v4.6 2155 # This became necessary for the arm cross TC v4.6
2156 # but probable applies to all new gcc TCs 2156 # but probable applies to all new gcc TCs
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 BUILD_TYPE_DESCRIPTION = 'Linux ${OPTIMIZATION_LEVEL} build', 2792 BUILD_TYPE_DESCRIPTION = 'Linux ${OPTIMIZATION_LEVEL} build',
2793 tools = ['target_platform_linux'], 2793 tools = ['target_platform_linux'],
2794 # TODO(bradnelson): this should really be able to live in unix_like_env 2794 # TODO(bradnelson): this should really be able to live in unix_like_env
2795 # but can't due to what the target_platform_x module is 2795 # but can't due to what the target_platform_x module is
2796 # doing. 2796 # doing.
2797 LINK = '$CXX', 2797 LINK = '$CXX',
2798 ) 2798 )
2799 2799
2800 # Prepend so we can disable warnings via Append 2800 # Prepend so we can disable warnings via Append
2801 linux_env.Prepend( 2801 linux_env.Prepend(
2802 CPPDEFINES = [['NACL_WINDOWS', '0'], 2802 CPPDEFINES = [['_DEFAULT_SOURCE', '1'],
2803 ['NACL_OSX', '0'],
2804 ['NACL_LINUX', '1'],
2805 ['NACL_ANDROID', '0'],
2806 ['_DEFAULT_SOURCE', '1'],
2807 ['_BSD_SOURCE', '1'], 2803 ['_BSD_SOURCE', '1'],
2808 ['_POSIX_C_SOURCE', '199506'], 2804 ['_POSIX_C_SOURCE', '199506'],
2809 ['_XOPEN_SOURCE', '600'], 2805 ['_XOPEN_SOURCE', '600'],
2810 ['_GNU_SOURCE', '1'], 2806 ['_GNU_SOURCE', '1'],
2811 ['_LARGEFILE64_SOURCE', '1'], 2807 ['_LARGEFILE64_SOURCE', '1'],
2812 ], 2808 ],
2813 LIBS = ['rt'], 2809 LIBS = ['rt'],
2814 ) 2810 )
2815 2811
2816 if linux_env.Bit('build_x86_32'): 2812 if linux_env.Bit('build_x86_32'):
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
3473 3469
3474 nacl_env.AddMethod(NaClSdkLibrary) 3470 nacl_env.AddMethod(NaClSdkLibrary)
3475 3471
3476 3472
3477 # Special environment for untrusted test binaries that use raw syscalls 3473 # Special environment for untrusted test binaries that use raw syscalls
3478 def RawSyscallObjects(env, sources): 3474 def RawSyscallObjects(env, sources):
3479 raw_syscall_env = env.Clone() 3475 raw_syscall_env = env.Clone()
3480 raw_syscall_env.Append( 3476 raw_syscall_env.Append(
3481 CPPDEFINES = [ 3477 CPPDEFINES = [
3482 ['USE_RAW_SYSCALLS', '1'], 3478 ['USE_RAW_SYSCALLS', '1'],
3483 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ], 3479 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ],
Mark Seaborn 2014/12/11 16:11:40 And these?
teravest 2014/12/15 20:08:36 Done.
3484 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ], 3480 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ],
3485 ], 3481 ],
3486 ) 3482 )
3487 objects = [] 3483 objects = []
3488 for source_file in sources: 3484 for source_file in sources:
3489 target_name = 'raw_' + os.path.basename(source_file).rstrip('.c') 3485 target_name = 'raw_' + os.path.basename(source_file).rstrip('.c')
3490 object = raw_syscall_env.ComponentObject(target_name, 3486 object = raw_syscall_env.ComponentObject(target_name,
3491 source_file) 3487 source_file)
3492 objects.append(object) 3488 objects.append(object)
3493 return objects 3489 return objects
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
4043 nacl_env.ValidateSdk() 4039 nacl_env.ValidateSdk()
4044 4040
4045 if BROKEN_TEST_COUNT > 0: 4041 if BROKEN_TEST_COUNT > 0:
4046 msg = "There are %d broken tests." % BROKEN_TEST_COUNT 4042 msg = "There are %d broken tests." % BROKEN_TEST_COUNT
4047 if GetOption('brief_comstr'): 4043 if GetOption('brief_comstr'):
4048 msg += " Add --verbose to the command line for more information." 4044 msg += " Add --verbose to the command line for more information."
4049 print msg 4045 print msg
4050 4046
4051 # separate warnings from actual build output 4047 # separate warnings from actual build output
4052 Banner('B U I L D - O U T P U T:') 4048 Banner('B U I L D - O U T P U T:')
OLDNEW
« no previous file with comments | « no previous file | src/include/atomic_ops.h » ('j') | src/include/nacl_defines.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698