| 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 import atexit | 6 import atexit |
| 7 import os | 7 import os |
| 8 import platform | 8 import platform |
| 9 import re | 9 import re |
| 10 import subprocess | 10 import subprocess |
| (...skipping 3104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3115 nacl_irt_env.Append(CCFLAGS=['--pnacl-frontend-triple=i686-unknown-nacl']) | 3115 nacl_irt_env.Append(CCFLAGS=['--pnacl-frontend-triple=i686-unknown-nacl']) |
| 3116 elif nacl_irt_env.Bit('target_x86_64'): | 3116 elif nacl_irt_env.Bit('target_x86_64'): |
| 3117 nacl_irt_env.Append(CCFLAGS=['--pnacl-frontend-triple=x86_64-unknown-nacl']) | 3117 nacl_irt_env.Append(CCFLAGS=['--pnacl-frontend-triple=x86_64-unknown-nacl']) |
| 3118 | 3118 |
| 3119 | 3119 |
| 3120 # All IRT code must avoid direct use of the TLS ABI register, which | 3120 # All IRT code must avoid direct use of the TLS ABI register, which |
| 3121 # is reserved for user TLS. Instead, ensure all TLS accesses use a | 3121 # is reserved for user TLS. Instead, ensure all TLS accesses use a |
| 3122 # call to __nacl_read_tp, which the IRT code overrides to segregate | 3122 # call to __nacl_read_tp, which the IRT code overrides to segregate |
| 3123 # IRT-private TLS from user TLS. | 3123 # IRT-private TLS from user TLS. |
| 3124 if nacl_irt_env.Bit('bitcode'): | 3124 if nacl_irt_env.Bit('bitcode'): |
| 3125 nacl_irt_env.Append(LINKFLAGS=['--pnacl-allow-native', | 3125 nacl_irt_env.Append(LINKFLAGS=['--pnacl-allow-native', '-Wt,-mtls-use-call']) |
| 3126 '-Wt,-mtls-use-call', | 3126 if nacl_irt_env.Bit('target_arm'): |
| 3127 '-Wl,--pnacl-irt-link']) | 3127 nacl_irt_env.Append(LINKFLAGS=['-Wl,--pnacl-irt-link']) |
| 3128 elif nacl_irt_env.Bit('target_arm'): | 3128 elif nacl_irt_env.Bit('target_arm'): |
| 3129 nacl_irt_env.Append(CCFLAGS=['-mtp=soft']) | 3129 nacl_irt_env.Append(CCFLAGS=['-mtp=soft']) |
| 3130 else: | 3130 else: |
| 3131 nacl_irt_env.Append(CCFLAGS=['-mtls-use-call']) | 3131 nacl_irt_env.Append(CCFLAGS=['-mtls-use-call']) |
| 3132 # A debugger should be able to unwind IRT call frames. As the IRT is compiled | 3132 # A debugger should be able to unwind IRT call frames. As the IRT is compiled |
| 3133 # with high level of optimizations and without debug info, compiler is requested | 3133 # with high level of optimizations and without debug info, compiler is requested |
| 3134 # to generate unwind tables explicitly. This is the default behavior on x86-64 | 3134 # to generate unwind tables explicitly. This is the default behavior on x86-64 |
| 3135 # and when compiling C++ with exceptions enabled, the change is for the benefit | 3135 # and when compiling C++ with exceptions enabled, the change is for the benefit |
| 3136 # of x86-32 C. | 3136 # of x86-32 C. |
| 3137 # TODO(eaeltsin): enable unwind tables for ARM | 3137 # TODO(eaeltsin): enable unwind tables for ARM |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3518 nacl_env.ValidateSdk() | 3518 nacl_env.ValidateSdk() |
| 3519 | 3519 |
| 3520 if BROKEN_TEST_COUNT > 0: | 3520 if BROKEN_TEST_COUNT > 0: |
| 3521 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 3521 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
| 3522 if GetOption('brief_comstr'): | 3522 if GetOption('brief_comstr'): |
| 3523 msg += " Add --verbose to the command line for more information." | 3523 msg += " Add --verbose to the command line for more information." |
| 3524 print msg | 3524 print msg |
| 3525 | 3525 |
| 3526 # separate warnings from actual build output | 3526 # separate warnings from actual build output |
| 3527 Banner('B U I L D - O U T P U T:') | 3527 Banner('B U I L D - O U T P U T:') |
| OLD | NEW |