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

Side by Side Diff: src/trusted/platform_qualify/build.scons

Issue 758223003: Cleanup: Use Bit('build_ARCH') instead of Bit('target_ARCH') (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix + simplify 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 | « src/trusted/cpu_features/build.scons ('k') | src/trusted/sel_universal/build.scons » ('j') | no next file with comments »
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 # TODO(bradchen): 6 # TODO(bradchen):
7 # - update plaform_qualify.gyp to be consistent with build.scons 7 # - update plaform_qualify.gyp to be consistent with build.scons
8 # - update sel_ldr to include blacklist check 8 # - update sel_ldr to include blacklist check
9 9
10 Import('env') 10 Import('env')
(...skipping 15 matching lines...) Expand all
26 elif env.Bit('linux'): 26 elif env.Bit('linux'):
27 pql_inputs += ['linux/nacl_os_qualify.c'] 27 pql_inputs += ['linux/nacl_os_qualify.c']
28 28
29 # Convert a library name into a target specific libary name 29 # Convert a library name into a target specific libary name
30 def TargetLib(env, name): 30 def TargetLib(env, name):
31 return name + '_' + env['TARGET_FULLARCH'].replace('-', '_') 31 return name + '_' + env['TARGET_FULLARCH'].replace('-', '_')
32 32
33 # 33 #
34 # Architecture-specific qualification routines 34 # Architecture-specific qualification routines
35 # 35 #
36 if env.Bit('build_x86') and env.Bit('target_x86'): 36 if env.Bit('build_x86') and env.Bit('build_x86'):
37 pql_inputs += ['arch/x86/nacl_cpuwhitelist.c'] 37 pql_inputs += ['arch/x86/nacl_cpuwhitelist.c']
38 38
39 # Make sure CPUID is present and truthful 39 # Make sure CPUID is present and truthful
40 vcpuid_env = env.Clone() 40 vcpuid_env = env.Clone()
41 if env.Bit('mac'): 41 if env.Bit('mac'):
42 vcpuid_env.Append(CCFLAGS = ['-mdynamic-no-pic']) 42 vcpuid_env.Append(CCFLAGS = ['-mdynamic-no-pic'])
43 vcpuid_env.FilterOut(CCFLAGS = ['-fPIC']) 43 vcpuid_env.FilterOut(CCFLAGS = ['-fPIC'])
44 if env.Bit('linux'): 44 if env.Bit('linux'):
45 vcpuid_env.Append(CCFLAGS = ['-msse3']) 45 vcpuid_env.Append(CCFLAGS = ['-msse3'])
46 nacl_vcpuid = vcpuid_env.ComponentLibrary('vcpuid', 'arch/x86/vcpuid.c') 46 nacl_vcpuid = vcpuid_env.ComponentLibrary('vcpuid', 'arch/x86/vcpuid.c')
47 extra_libs += ['platform_qual_lib', 47 extra_libs += ['platform_qual_lib',
48 'platform', 48 'platform',
49 'gio', 49 'gio',
50 'vcpuid'] 50 'vcpuid']
51 51
52 if env.Bit('target_x86_64'): 52 if env.Bit('build_x86_64'):
53 # Compile x86-64 primitives for verifying NX functionality 53 # Compile x86-64 primitives for verifying NX functionality
54 pql_inputs += ['arch/x86_64/nacl_dep_qualify_arch.c'] 54 pql_inputs += ['arch/x86_64/nacl_dep_qualify_arch.c']
55 elif env.Bit('target_x86_32'): 55 elif env.Bit('build_x86_32'):
56 pql_inputs += ['arch/x86_32/nacl_dep_qualify_arch.c'] 56 pql_inputs += ['arch/x86_32/nacl_dep_qualify_arch.c']
57 57
58 platform_qual_test = env.ComponentProgram( 58 platform_qual_test = env.ComponentProgram(
59 'platform_qual_test', 'arch/x86/platform_qual_test.c', 59 'platform_qual_test', 'arch/x86/platform_qual_test.c',
60 # 'sel' is required for sel_memory.c and friends 60 # 'sel' is required for sel_memory.c and friends
61 EXTRA_LIBS=extra_libs + ['sel']) 61 EXTRA_LIBS=extra_libs + ['sel'])
62 node = env.CommandTest('platform_qual_test.out', [platform_qual_test]) 62 node = env.CommandTest('platform_qual_test.out', [platform_qual_test])
63 env.AddNodeToTestSuite( 63 env.AddNodeToTestSuite(
64 node, ['small_tests'], 'run_platform_qual_test', 64 node, ['small_tests'], 'run_platform_qual_test',
65 is_broken=env.IsRunningUnderValgrind()) 65 is_broken=env.IsRunningUnderValgrind())
(...skipping 23 matching lines...) Expand all
89 # 89 #
90 # ---------------------------------------------------------- 90 # ----------------------------------------------------------
91 env.DualLibrary('platform_qual_lib', pql_inputs) 91 env.DualLibrary('platform_qual_lib', pql_inputs)
92 92
93 93
94 # These tests use assembly which seem to make the coverage instrumentation 94 # These tests use assembly which seem to make the coverage instrumentation
95 # on windows unhappy. Disable them for now on coverage for windows. 95 # on windows unhappy. Disable them for now on coverage for windows.
96 # TODO(bradnelson): figure out a way to get coverage working for these. 96 # TODO(bradnelson): figure out a way to get coverage working for these.
97 if env.Bit('windows') and env.Bit('coverage_enabled'): 97 if env.Bit('windows') and env.Bit('coverage_enabled'):
98 Return() 98 Return()
OLDNEW
« no previous file with comments | « src/trusted/cpu_features/build.scons ('k') | src/trusted/sel_universal/build.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698