| 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 | 6 |
| 7 Import('env') | 7 Import('env') |
| 8 | 8 |
| 9 # TODO(mseaborn): Enable -Wstrict-prototypes here. Currently | 9 # TODO(mseaborn): Enable -Wstrict-prototypes here. Currently |
| 10 # dlmalloc/malloc.c does not build with this warning. | 10 # dlmalloc/malloc.c does not build with this warning. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 'irt_core_resource.c', | 85 'irt_core_resource.c', |
| 86 ] | 86 ] |
| 87 | 87 |
| 88 irt_libs = ['srpc', | 88 irt_libs = ['srpc', |
| 89 'imc_syscalls', | 89 'imc_syscalls', |
| 90 'platform', | 90 'platform', |
| 91 'gio', | 91 'gio', |
| 92 'm', | 92 'm', |
| 93 ] | 93 ] |
| 94 | 94 |
| 95 irt_core_library = blob_env.ComponentProgram( | 95 irt_core_raw = blob_env.ComponentProgram( |
| 96 'irt_core', irt_support_objs + irt_nonbrowser, EXTRA_LIBS=irt_libs) | 96 'irt_core_raw', irt_support_objs + irt_nonbrowser, EXTRA_LIBS=irt_libs) |
| 97 |
| 98 irt_core_nexe = blob_env.ApplyTLSEdit( |
| 99 'irt_core.nexe', |
| 100 irt_core_raw) |
| 101 |
| 102 irt_core_library = blob_env.Install('${STAGING_DIR}', irt_core_nexe) |
| 103 blob_env.Alias('irt_core', irt_core_library) |
| 104 blob_env.ComponentProgramAlias(irt_core_library) |
| 105 |
| 97 env.SDKInstallBin('irt_core.nexe', irt_core_library) | 106 env.SDKInstallBin('irt_core.nexe', irt_core_library) |
| 98 | 107 |
| 99 # TODO(mcgrathr): these should be installed, but scons is a mystery | 108 # TODO(mcgrathr): these should be installed, but scons is a mystery |
| 100 #env.AddHeaderToSdk(['irt.h']) | 109 #env.AddHeaderToSdk(['irt.h']) |
| 101 #env.AddHeaderToSdk(['irt_ppapi.h']) | 110 #env.AddHeaderToSdk(['irt_ppapi.h']) |
| 102 | 111 |
| 103 # Make sure that the linked IRT nexe never uses TLS via the TLS ABI | 112 # Make sure that the linked IRT nexe never uses TLS via the TLS ABI |
| 104 # register (e.g., %gs on x86-32). All IRT code must avoid direct use | 113 # register (e.g., %gs on x86-32). All IRT code must avoid direct use |
| 105 # of the TLS ABI register, which is reserved for user TLS. Instead, | 114 # of the TLS ABI register, which is reserved for user TLS. Instead, |
| 106 # ensure all TLS accesses use a call to __nacl_read_tp (or __aeabi_read_tp | 115 # ensure all TLS accesses use a call to __nacl_read_tp (or __aeabi_read_tp |
| 107 # for ARM), which the IRT code overrides to segregate IRT-private TLS | 116 # for ARM), which the IRT code overrides to segregate IRT-private TLS |
| 108 # from user TLS. | 117 # from user TLS. |
| 109 if ((env.Bit('build_arm') or env.Bit('build_x86_32')) | 118 if ((env.Bit('build_arm') or env.Bit('build_x86_32')) |
| 110 # Do not try to run OBJDUMP if 'built_elsewhere', since that *might* | 119 # Do not try to run OBJDUMP if 'built_elsewhere', since that *might* |
| 111 # mean that a toolchain is not even present. E.g., the arm buildbots | 120 # mean that a toolchain is not even present. E.g., the arm buildbots |
| 112 # do not have the pnacl toolchain, since that is built for x86 hosts. | 121 # do not have the pnacl toolchain, since that is built for x86 hosts. |
| 113 and not env.Bit('built_elsewhere')): | 122 and not env.Bit('built_elsewhere')): |
| 114 check_tls_arch = '${TARGET_FULLARCH}' | 123 check_tls_arch = '${TARGET_FULLARCH}' |
| 115 if env.Bit('build_arm'): | 124 if env.Bit('build_arm'): |
| 116 check_tls_arch = 'arm' | 125 check_tls_arch = 'arm' |
| 117 node = env.CommandTest('irt_core_tls_test.out', | 126 node = env.CommandTest('irt_core_tls_test.out', |
| 118 ['${PYTHON}', env.File('check_tls.py'), | 127 ['${PYTHON}', env.File('check_tls.py'), |
| 119 check_tls_arch, '${OBJDUMP}', irt_core_library], | 128 check_tls_arch, '${OBJDUMP}', irt_core_library], |
| 120 # don't run ${PYTHON} under the emulator. | 129 # don't run ${PYTHON} under the emulator. |
| 121 direct_emulation=False) | 130 direct_emulation=False) |
| 122 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_core_tls_test') | 131 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_core_tls_test') |
| OLD | NEW |