OLD | NEW |
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 Loading... |
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 Loading... |
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() |
OLD | NEW |