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 atexit | 6 import atexit |
7 import glob | 7 import glob |
8 import os | 8 import os |
9 import platform | 9 import platform |
10 import stat | 10 import stat |
(...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2547 target_variant_map = [ | 2547 target_variant_map = [ |
2548 ('bitcode', 'pnacl'), | 2548 ('bitcode', 'pnacl'), |
2549 ('nacl_pic', 'pic'), | 2549 ('nacl_pic', 'pic'), |
2550 ('use_sandboxed_translator', 'sbtc'), | 2550 ('use_sandboxed_translator', 'sbtc'), |
2551 ('nacl_glibc', 'glibc'), | 2551 ('nacl_glibc', 'glibc'), |
2552 ] | 2552 ] |
2553 for variant_bit, variant_suffix in target_variant_map: | 2553 for variant_bit, variant_suffix in target_variant_map: |
2554 if nacl_env.Bit(variant_bit): | 2554 if nacl_env.Bit(variant_bit): |
2555 nacl_env['TARGET_VARIANT'] += '-' + variant_suffix | 2555 nacl_env['TARGET_VARIANT'] += '-' + variant_suffix |
2556 | 2556 |
2557 # Since the default linking layout is compatible with IRT loading now, | |
2558 # we should not need anything special here. | |
2559 # TODO(mcgrathr): Perhaps remove the variable entirely at some point. | |
2560 nacl_env.Replace(NON_PPAPI_BROWSER_LIBS=[]) | |
2561 | |
2562 if nacl_env.Bit('irt'): | 2557 if nacl_env.Bit('irt'): |
2558 # Since the default linking layout is compatible with IRT loading now, | |
2559 # we should not need anything special here. | |
2560 nacl_env.Replace(NON_PPAPI_BROWSER_LIBS=[]) | |
2563 nacl_env.Replace(PPAPI_LIBS=['ppapi']) | 2561 nacl_env.Replace(PPAPI_LIBS=['ppapi']) |
2564 # Even non-PPAPI nexes need this for IRT-compatible linking. | |
2565 # We don't just make them link with ${PPAPI_LIBS} because in | |
2566 # the non-IRT case under dynamic linking, that tries to link | |
2567 # in libppruntime.so with its undefined symbols and fails | |
2568 # for nexes that aren't actually PPAPI users. | |
2569 else: | 2562 else: |
2570 # TODO(mseaborn): This will go away when we only support using PPAPI | 2563 # TODO(mseaborn): This will go away when we only support using PPAPI |
bsy
2011/08/16 22:01:15
i think this comment is out of date. we need this
| |
2571 # via the IRT library, so users of this dependency should not rely | 2564 # via the IRT library, so users of this dependency should not rely |
2572 # on individual libraries like 'platform' being included by default. | 2565 # on individual libraries like 'platform' being included by default. |
2566 nacl_env.Replace(NON_PPAPI_BROWSER_LIBS=['${NONIRT_LIBS}']) | |
2573 nacl_env.Replace(PPAPI_LIBS=['ppruntime', 'srpc', 'imc', 'imc_syscalls', | 2567 nacl_env.Replace(PPAPI_LIBS=['ppruntime', 'srpc', 'imc', 'imc_syscalls', |
2574 'platform', 'gio', 'pthread', 'm']) | 2568 'platform', 'gio', '${PTHREAD_LIBS}', 'm', |
2569 '${NONIRT_LIBS}']) | |
2575 | 2570 |
2576 # TODO(mseaborn): Make nacl-glibc-based static linking work with just | 2571 # TODO(mseaborn): Make nacl-glibc-based static linking work with just |
2577 # "-static", without specifying a linker script. | 2572 # "-static", without specifying a linker script. |
2578 # See http://code.google.com/p/nativeclient/issues/detail?id=1298 | 2573 # See http://code.google.com/p/nativeclient/issues/detail?id=1298 |
2579 def GetLinkerScriptBaseName(env): | 2574 def GetLinkerScriptBaseName(env): |
2580 if env.Bit('build_x86_64'): | 2575 if env.Bit('build_x86_64'): |
2581 return 'elf64_nacl' | 2576 return 'elf64_nacl' |
2582 else: | 2577 else: |
2583 return 'elf_nacl' | 2578 return 'elf_nacl' |
2584 | 2579 |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3213 nacl_env.ValidateSdk() | 3208 nacl_env.ValidateSdk() |
3214 | 3209 |
3215 if BROKEN_TEST_COUNT > 0: | 3210 if BROKEN_TEST_COUNT > 0: |
3216 msg = "There are %d broken tests." % BROKEN_TEST_COUNT | 3211 msg = "There are %d broken tests." % BROKEN_TEST_COUNT |
3217 if GetOption('brief_comstr'): | 3212 if GetOption('brief_comstr'): |
3218 msg += " Add --verbose to the command line for more information." | 3213 msg += " Add --verbose to the command line for more information." |
3219 print msg | 3214 print msg |
3220 | 3215 |
3221 # separate warnings from actual build output | 3216 # separate warnings from actual build output |
3222 Banner('B U I L D - O U T P U T:') | 3217 Banner('B U I L D - O U T P U T:') |
OLD | NEW |