| 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 2722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2733 # These are settings for in-tree, non-browser tests to use. | 2733 # These are settings for in-tree, non-browser tests to use. |
| 2734 # They use libraries that circumvent the IRT-based implementations | 2734 # They use libraries that circumvent the IRT-based implementations |
| 2735 # in the public libraries. | 2735 # in the public libraries. |
| 2736 NONIRT_LIBS = ['nacl_sys_private'], | 2736 NONIRT_LIBS = ['nacl_sys_private'], |
| 2737 PTHREAD_LIBS = ['pthread_private'], | 2737 PTHREAD_LIBS = ['pthread_private'], |
| 2738 DYNCODE_LIBS = ['nacl_dyncode_private'], | 2738 DYNCODE_LIBS = ['nacl_dyncode_private'], |
| 2739 EXCEPTION_LIBS = ['nacl_exception_private'], | 2739 EXCEPTION_LIBS = ['nacl_exception_private'], |
| 2740 LIST_MAPPINGS_LIBS = ['nacl_list_mappings_private'], | 2740 LIST_MAPPINGS_LIBS = ['nacl_list_mappings_private'], |
| 2741 ) | 2741 ) |
| 2742 | 2742 |
| 2743 # TODO(mcgrathr): Remove this after the new binutils has settled. | |
| 2744 def IsNewLinker(env): | 2743 def IsNewLinker(env): |
| 2745 """Return True if using a new-style linker with the new-style layout. | 2744 """Return True if using a new-style linker with the new-style layout. |
| 2746 That means the linker supports the -Trodata-segment switch.""" | 2745 That means the linker supports the -Trodata-segment switch.""" |
| 2747 return True | 2746 return env.Bit('target_arm') or env.Bit('bitcode') |
| 2748 | 2747 |
| 2749 nacl_env.AddMethod(IsNewLinker) | 2748 nacl_env.AddMethod(IsNewLinker) |
| 2750 | 2749 |
| 2751 def UsesAbiNote(env): | 2750 def UsesAbiNote(env): |
| 2752 """Return True if using a new-style GCC with .note.NaCl.ABI.* notes. | 2751 """Return True if using a new-style GCC with .note.NaCl.ABI.* notes. |
| 2753 This means there will always be an RODATA segment, even if just for the note.""" | 2752 This means there will always be an RODATA segment, even if just for the note.""" |
| 2754 return env.Bit('target_arm') and not env.Bit('bitcode') | 2753 return env.Bit('target_arm') and not env.Bit('bitcode') |
| 2755 | 2754 |
| 2756 nacl_env.AddMethod(UsesAbiNote) | 2755 nacl_env.AddMethod(UsesAbiNote) |
| 2757 | 2756 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 | 3002 |
| 3004 nacl_env.Replace(TESTRUNNER_LIBS=['testrunner']) | 3003 nacl_env.Replace(TESTRUNNER_LIBS=['testrunner']) |
| 3005 # TODO(mseaborn): Drop this once chrome side has inlined this. | 3004 # TODO(mseaborn): Drop this once chrome side has inlined this. |
| 3006 nacl_env.Replace(PPAPI_LIBS=['ppapi']) | 3005 nacl_env.Replace(PPAPI_LIBS=['ppapi']) |
| 3007 | 3006 |
| 3008 # TODO(mseaborn): Make nacl-glibc-based static linking work with just | 3007 # TODO(mseaborn): Make nacl-glibc-based static linking work with just |
| 3009 # "-static", without specifying a linker script. | 3008 # "-static", without specifying a linker script. |
| 3010 # See http://code.google.com/p/nativeclient/issues/detail?id=1298 | 3009 # See http://code.google.com/p/nativeclient/issues/detail?id=1298 |
| 3011 def GetLinkerScriptBaseName(env): | 3010 def GetLinkerScriptBaseName(env): |
| 3012 if env.Bit('build_x86_64'): | 3011 if env.Bit('build_x86_64'): |
| 3013 return 'elf_x86_64_nacl' | 3012 return 'elf64_nacl' |
| 3014 else: | 3013 else: |
| 3015 return 'elf_i386_nacl' | 3014 return 'elf_nacl' |
| 3016 | 3015 |
| 3017 if (nacl_env.Bit('nacl_glibc') and | 3016 if (nacl_env.Bit('nacl_glibc') and |
| 3018 nacl_env.Bit('nacl_static_link')): | 3017 nacl_env.Bit('nacl_static_link')): |
| 3019 if nacl_env.IsNewLinker(): | 3018 if nacl_env.IsNewLinker(): |
| 3020 nacl_env.Append(LINKFLAGS=['-static']) | 3019 nacl_env.Append(LINKFLAGS=['-static']) |
| 3021 else: | 3020 else: |
| 3022 # The "-lc" is necessary because libgcc_eh depends on libc but for | 3021 # The "-lc" is necessary because libgcc_eh depends on libc but for |
| 3023 # some reason nacl-gcc is not linking with "--start-group/--end-group". | 3022 # some reason nacl-gcc is not linking with "--start-group/--end-group". |
| 3024 nacl_env.Append(LINKFLAGS=[ | 3023 nacl_env.Append(LINKFLAGS=[ |
| 3025 '-static', | 3024 '-static', |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3714 nacl_env.ValidateSdk() | 3713 nacl_env.ValidateSdk() |
| 3715 | 3714 |
| 3716 if BROKEN_TEST_COUNT > 0: | 3715 if BROKEN_TEST_COUNT > 0: |
| 3717 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 3716 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
| 3718 if GetOption('brief_comstr'): | 3717 if GetOption('brief_comstr'): |
| 3719 msg += " Add --verbose to the command line for more information." | 3718 msg += " Add --verbose to the command line for more information." |
| 3720 print msg | 3719 print msg |
| 3721 | 3720 |
| 3722 # separate warnings from actual build output | 3721 # separate warnings from actual build output |
| 3723 Banner('B U I L D - O U T P U T:') | 3722 Banner('B U I L D - O U T P U T:') |
| OLD | NEW |