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