| 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') |
| 11 | 11 |
| 12 | 12 |
| 13 pql_inputs = [] | 13 pql_inputs = [] |
| 14 extra_libs = [] |
| 14 | 15 |
| 15 # | 16 # |
| 16 # OS-specific qualification routines | 17 # OS-specific qualification routines |
| 17 # | 18 # |
| 18 if env.Bit('windows'): | 19 if env.Bit('windows'): |
| 19 pql_inputs += ['win/nacl_os_qualify.c', | 20 pql_inputs += ['win/nacl_os_qualify.c', |
| 20 'win/nacl_dep_qualify.c'] | 21 'win/nacl_dep_qualify.c'] |
| 21 else: | 22 else: |
| 22 pql_inputs += ['posix/nacl_dep_qualify.c'] | 23 pql_inputs += ['posix/nacl_dep_qualify.c'] |
| 23 if env.Bit('mac'): | 24 if env.Bit('mac'): |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 if env.Bit('build_x86') and env.Bit('target_x86'): | 38 if env.Bit('build_x86') and env.Bit('target_x86'): |
| 38 pql_inputs += ['arch/x86/nacl_cpuwhitelist.c'] | 39 pql_inputs += ['arch/x86/nacl_cpuwhitelist.c'] |
| 39 | 40 |
| 40 # Make sure CPUID is present and truthful | 41 # Make sure CPUID is present and truthful |
| 41 vcpuid_env = env.Clone() | 42 vcpuid_env = env.Clone() |
| 42 if env.Bit('mac'): | 43 if env.Bit('mac'): |
| 43 vcpuid_env.Append(CCFLAGS = ['-mdynamic-no-pic']) | 44 vcpuid_env.Append(CCFLAGS = ['-mdynamic-no-pic']) |
| 44 vcpuid_env.FilterOut(CCFLAGS = ['-fPIC']) | 45 vcpuid_env.FilterOut(CCFLAGS = ['-fPIC']) |
| 45 if env.Bit('linux'): | 46 if env.Bit('linux'): |
| 46 vcpuid_env.Append(CCFLAGS = ['-msse3']) | 47 vcpuid_env.Append(CCFLAGS = ['-msse3']) |
| 47 env.Prepend(LIBS = ['platform_qual_lib', | |
| 48 TargetLib(env, 'ncval_base'), | |
| 49 'platform', 'gio']) | |
| 50 nacl_vcpuid = vcpuid_env.ComponentLibrary('vcpuid', 'arch/x86/vcpuid.c') | 48 nacl_vcpuid = vcpuid_env.ComponentLibrary('vcpuid', 'arch/x86/vcpuid.c') |
| 51 env.Append(LIBS = ['vcpuid']) | 49 extra_libs += ['platform_qual_lib', |
| 50 TargetLib(env, 'ncval_base'), |
| 51 'platform', |
| 52 'gio', |
| 53 'vcpuid'] |
| 52 | 54 |
| 53 if env.Bit('target_x86_64'): | 55 if env.Bit('target_x86_64'): |
| 54 # Compile x86-64 primitives for verifying NX functionality | 56 # Compile x86-64 primitives for verifying NX functionality |
| 55 pql_inputs += ['arch/x86_64/nacl_dep_qualify_arch.c'] | 57 pql_inputs += ['arch/x86_64/nacl_dep_qualify_arch.c'] |
| 56 elif env.Bit('target_x86_32'): | 58 elif env.Bit('target_x86_32'): |
| 57 pql_inputs += ['arch/x86_32/nacl_dep_qualify_arch.c'] | 59 pql_inputs += ['arch/x86_32/nacl_dep_qualify_arch.c'] |
| 58 | 60 |
| 59 platform_qual_test = env.ComponentProgram( | 61 platform_qual_test = env.ComponentProgram( |
| 60 'platform_qual_test', 'arch/x86/platform_qual_test.c', | 62 'platform_qual_test', 'arch/x86/platform_qual_test.c', |
| 61 # 'sel' is required for sel_memory.c and friends | 63 # 'sel' is required for sel_memory.c and friends |
| 62 EXTRA_LIBS=['platform_qual_lib', 'sel']) | 64 EXTRA_LIBS=extra_libs + ['sel']) |
| 63 node = env.CommandTest('platform_qual_test.out', [platform_qual_test]) | 65 node = env.CommandTest('platform_qual_test.out', [platform_qual_test]) |
| 64 env.AddNodeToTestSuite( | 66 env.AddNodeToTestSuite( |
| 65 node, ['small_tests'], 'run_platform_qual_test', | 67 node, ['small_tests'], 'run_platform_qual_test', |
| 66 is_broken=env.IsRunningUnderValgrind()) | 68 is_broken=env.IsRunningUnderValgrind()) |
| 67 | 69 |
| 68 cpuwhitelist_test = env.ComponentProgram( | 70 cpuwhitelist_test = env.ComponentProgram( |
| 69 'cpuwhitelist_test', 'arch/x86/nacl_cpuwhitelist_test.c') | 71 'cpuwhitelist_test', 'arch/x86/nacl_cpuwhitelist_test.c', |
| 72 EXTRA_LIBS=extra_libs) |
| 70 node = env.CommandTest('cpuwhitelist_test.out', [cpuwhitelist_test]) | 73 node = env.CommandTest('cpuwhitelist_test.out', [cpuwhitelist_test]) |
| 71 env.AddNodeToTestSuite(node, ['small_tests'], 'run_cpuwhitelist_test') | 74 env.AddNodeToTestSuite(node, ['small_tests'], 'run_cpuwhitelist_test') |
| 72 | 75 |
| 73 | 76 |
| 74 if env.Bit('build_arm'): | 77 if env.Bit('build_arm'): |
| 75 # Compile ARM primitives for checking XN functionality | 78 # Compile ARM primitives for checking XN functionality |
| 76 pql_inputs += ['arch/arm/nacl_dep_qualify_arch.c'] | 79 pql_inputs += ['arch/arm/nacl_dep_qualify_arch.c'] |
| 77 # Compile ARM primitives for checking VFP/vector features. | 80 # Compile ARM primitives for checking VFP/vector features. |
| 78 pql_inputs += ['arch/arm/nacl_qualify_fpu.c'] | 81 pql_inputs += ['arch/arm/nacl_qualify_fpu.c'] |
| 79 | 82 |
| 80 if env.Bit('build_mips32'): | 83 if env.Bit('build_mips32'): |
| 81 # Compile Mips primitives for checking XN functionality | 84 # Compile Mips primitives for checking XN functionality |
| 82 pql_inputs += ['arch/mips/nacl_dep_qualify_arch.c'] | 85 pql_inputs += ['arch/mips/nacl_dep_qualify_arch.c'] |
| 83 | 86 |
| 84 # ---------------------------------------------------------- | 87 # ---------------------------------------------------------- |
| 85 # | 88 # |
| 86 # ---------------------------------------------------------- | 89 # ---------------------------------------------------------- |
| 87 env.DualLibrary('platform_qual_lib', pql_inputs) | 90 env.DualLibrary('platform_qual_lib', pql_inputs) |
| 88 | 91 |
| 89 | 92 |
| 90 # These tests use assembly which seem to make the coverage instrumentation | 93 # These tests use assembly which seem to make the coverage instrumentation |
| 91 # on windows unhappy. Disable them for now on coverage for windows. | 94 # on windows unhappy. Disable them for now on coverage for windows. |
| 92 # TODO(bradnelson): figure out a way to get coverage working for these. | 95 # TODO(bradnelson): figure out a way to get coverage working for these. |
| 93 if env.Bit('windows') and env.Bit('coverage_enabled'): | 96 if env.Bit('windows') and env.Bit('coverage_enabled'): |
| 94 Return() | 97 Return() |
| OLD | NEW |