| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 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 platform | 6 import platform |
| 7 import os | 7 import os |
| 8 | 8 |
| 9 Import('env') | 9 Import('env') |
| 10 | 10 |
| 11 # TODO(robertm): consider adding this to the top level scons files | 11 # TODO(robertm): consider adding this to the top level scons files |
| 12 env.Append(CPPPATH=['${TARGET_ROOT}']) | 12 env.Append(CPPPATH=['${TARGET_ROOT}']) |
| 13 # this is needed for including gen/... files, see GENERATED below | 13 # this is needed for including gen/... files, see GENERATED below |
| 14 | 14 |
| 15 # this is needed for including gdb_utils files | 15 # this is needed for including gdb_utils files |
| 16 env.Append(CPPPATH=['${SOURCE_ROOT}/gdb_utils/src']) | 16 env.Append(CPPPATH=['${SOURCE_ROOT}/gdb_utils/src']) |
| 17 | 17 |
| 18 DEBUG_LIBS = ['debug_stub_init', 'gdb_rsp', 'debug_stub'] | 18 DEBUG_LIBS = ['debug_stub_init', 'gdb_rsp', 'debug_stub'] |
| 19 if env.Bit('windows'): | 19 if env.Bit('windows'): |
| 20 env.Append(CPPDEFINES=['WIN32']) | 20 env.Append(CPPDEFINES=['WIN32']) |
| 21 if env.Bit('target_x86_64'): | 21 if env.Bit('target_x86_64'): |
| 22 env.Append(CPPDEFINES=['WIN64']) | 22 env.Append(CPPDEFINES=['WIN64']) |
| 23 | 23 |
| 24 # Thumb2 mode sets a variety of different defines. |
| 25 if env.Bit('target_arm_thumb2'): |
| 26 env.Append(CPPDEFINES=['NACL_TARGET_IS_THUMB2=1']) |
| 27 |
| 24 # normally comment out -- uncomment out to test the pedantic removal | 28 # normally comment out -- uncomment out to test the pedantic removal |
| 25 # check below. | 29 # check below. |
| 26 #if env.Bit('linux') or env.Bit('mac'): | 30 #if env.Bit('linux') or env.Bit('mac'): |
| 27 # env.FilterOut(CCFLAGS=['-pedantic']) | 31 # env.FilterOut(CCFLAGS=['-pedantic']) |
| 28 # env.FilterOut(CCFLAGS=['-Wall']) | 32 # env.FilterOut(CCFLAGS=['-Wall']) |
| 29 | 33 |
| 30 # Make a copy of debug CRT for now. | 34 # Make a copy of debug CRT for now. |
| 31 # TODO(bradnelson): there should be a better way to generalize this requirement. | 35 # TODO(bradnelson): there should be a better way to generalize this requirement. |
| 32 crt = [] | 36 crt = [] |
| 33 if env.AllBits('windows', 'debug'): | 37 if env.AllBits('windows', 'debug'): |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 elif env.Bit('build_arm'): | 126 elif env.Bit('build_arm'): |
| 123 ldr_inputs += [ | 127 ldr_inputs += [ |
| 124 'arch/arm/nacl_app.c', | 128 'arch/arm/nacl_app.c', |
| 125 'arch/arm/nacl_switch_to_app_arm.c', | 129 'arch/arm/nacl_switch_to_app_arm.c', |
| 126 'arch/arm/sel_rt.c', | 130 'arch/arm/sel_rt.c', |
| 127 'arch/arm/nacl_tls.c', | 131 'arch/arm/nacl_tls.c', |
| 128 'arch/arm/sel_ldr_arm.c', | 132 'arch/arm/sel_ldr_arm.c', |
| 129 'arch/arm/sel_addrspace_arm.c', | 133 'arch/arm/sel_addrspace_arm.c', |
| 130 'arch/arm/nacl_switch.S', | 134 'arch/arm/nacl_switch.S', |
| 131 'arch/arm/nacl_syscall.S', | 135 'arch/arm/nacl_syscall.S', |
| 132 'arch/arm/springboard.S', | |
| 133 'arch/arm/tramp_arm.S', | |
| 134 ] | 136 ] |
| 135 if env.Bit('target_arm_thumb2'): | 137 if env.Bit('build_arm_thumb2') or env.Bit('target_arm_thumb2'): |
| 136 thumb2_env = env.Clone() | 138 thumb2_env = env.Clone() |
| 137 thumb2_env.Append(ASFLAGS=['-mthumb']) | 139 thumb2_env.Replace(ASFLAGS=['-mthumb']) |
| 138 ldr_inputs += [ | 140 ldr_inputs += [ |
| 139 thumb2_env.DualObject('arch/arm/springboard_thumb2.S'), | 141 thumb2_env.DualObject('arch/arm/springboard_thumb2.S'), |
| 140 thumb2_env.DualObject('arch/arm/tramp_arm_thumb2.S'), | 142 thumb2_env.DualObject('arch/arm/tramp_arm_thumb2.S'), |
| 141 ] | 143 ] |
| 142 else: | 144 else: |
| 143 ldr_inputs += [ | 145 ldr_inputs += [ |
| 144 'arch/arm/springboard.S', | 146 'arch/arm/springboard.S', |
| 145 'arch/arm/tramp_arm.S', | 147 'arch/arm/tramp_arm.S', |
| 146 ] | 148 ] |
| 147 | 149 |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 expected_exit_status = 'sigabrt' | 845 expected_exit_status = 'sigabrt' |
| 844 node = env.CommandTest( | 846 node = env.CommandTest( |
| 845 'sel_ldr_thread_death_test.out', | 847 'sel_ldr_thread_death_test.out', |
| 846 command=[sel_ldr_thread_death_test_exe], | 848 command=[sel_ldr_thread_death_test_exe], |
| 847 exit_status=expected_exit_status) | 849 exit_status=expected_exit_status) |
| 848 | 850 |
| 849 # TODO(tuduce): Make it work on windows. | 851 # TODO(tuduce): Make it work on windows. |
| 850 env.AddNodeToTestSuite(node, ['medium_tests'], | 852 env.AddNodeToTestSuite(node, ['medium_tests'], |
| 851 'run_sel_ldr_thread_death_test', | 853 'run_sel_ldr_thread_death_test', |
| 852 is_broken=env.Bit('windows')) | 854 is_broken=env.Bit('windows')) |
| OLD | NEW |