| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/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 """Nacl SDK tool SCons.""" | 6 """Nacl SDK tool SCons.""" |
| 7 | 7 |
| 8 import __builtin__ | 8 import __builtin__ |
| 9 import re | 9 import re |
| 10 import os | 10 import os |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 env.Replace( | 377 env.Replace( |
| 378 COMPONENT_LINKFLAGS=[''], | 378 COMPONENT_LINKFLAGS=[''], |
| 379 COMPONENT_LIBRARY_LINK_SUFFIXES=['.pso', '.so', '.a'], | 379 COMPONENT_LIBRARY_LINK_SUFFIXES=['.pso', '.so', '.a'], |
| 380 _RPATH='', | 380 _RPATH='', |
| 381 COMPONENT_LIBRARY_DEBUG_SUFFIXES=[], | 381 COMPONENT_LIBRARY_DEBUG_SUFFIXES=[], |
| 382 | 382 |
| 383 # TODO: This is needed for now to work around unc paths. Take this out | 383 # TODO: This is needed for now to work around unc paths. Take this out |
| 384 # when unc paths are fixed. | 384 # when unc paths are fixed. |
| 385 IMPLICIT_COMMAND_DEPENDENCIES=False, | 385 IMPLICIT_COMMAND_DEPENDENCIES=False, |
| 386 | 386 |
| 387 # TODO: this could be .nexe and then all the .nexe stuff goes away? | 387 PROGSUFFIX='.nexe' |
| 388 PROGSUFFIX='' # Force PROGSUFFIX to '' on all platforms. | |
| 389 ) | 388 ) |
| 390 | 389 |
| 391 # Get root of the SDK. | 390 # Get root of the SDK. |
| 392 root = _GetNaclSdkRoot(env, sdk_mode) | 391 root = _GetNaclSdkRoot(env, sdk_mode) |
| 393 | 392 |
| 394 # Determine where to get the SDK from. | 393 # Determine where to get the SDK from. |
| 395 if sdk_mode == 'manual': | 394 if sdk_mode == 'manual': |
| 396 _SetEnvForSdkManually(env) | 395 _SetEnvForSdkManually(env) |
| 397 else: | 396 else: |
| 398 # if bitcode=1 use pnacl toolchain | 397 # if bitcode=1 use pnacl toolchain |
| 399 if env.Bit('bitcode'): | 398 if env.Bit('bitcode'): |
| 400 _SetEnvForPnacl(env, root) | 399 _SetEnvForPnacl(env, root) |
| 401 elif env.Bit('target_x86'): | 400 elif env.Bit('target_x86'): |
| 402 _SetEnvForX86Sdk(env, root) | 401 _SetEnvForX86Sdk(env, root) |
| 403 else: | 402 else: |
| 404 print "ERROR: unknown TARGET_ARCHITECTURE: ", env['TARGET_ARCHITECTURE'] | 403 print "ERROR: unknown TARGET_ARCHITECTURE: ", env['TARGET_ARCHITECTURE'] |
| 405 assert 0 | 404 assert 0 |
| 406 | 405 |
| 407 env.Prepend(LIBPATH='${NACL_SDK_LIB}') | 406 env.Prepend(LIBPATH='${NACL_SDK_LIB}') |
| OLD | NEW |