| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/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 """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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 568 |
| 569 ASCOM='$AS $BASE_ASFLAGS $ASFLAGS $EXTRA_ASFLAGS -o $TARGET $SOURCES', | 569 ASCOM='$AS $BASE_ASFLAGS $ASFLAGS $EXTRA_ASFLAGS -o $TARGET $SOURCES', |
| 570 ASPPCOM='$ASPP $BASE_ASPPFLAGS $ASPPFLAGS $EXTRA_ASPPFLAGS ' + | 570 ASPPCOM='$ASPP $BASE_ASPPFLAGS $ASPPFLAGS $EXTRA_ASPPFLAGS ' + |
| 571 '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES', | 571 '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES', |
| 572 | 572 |
| 573 # Strip doesn't seem to be a first-class citizen in SCons country, | 573 # Strip doesn't seem to be a first-class citizen in SCons country, |
| 574 # so we have to add these *COM, *COMSTR manually. | 574 # so we have to add these *COM, *COMSTR manually. |
| 575 # Note: it appears we cannot add this in component_setup.py | 575 # Note: it appears we cannot add this in component_setup.py |
| 576 STRIPFLAGS=['--strip-all'], | 576 STRIPFLAGS=['--strip-all'], |
| 577 STRIPCOM='${STRIP} ${STRIPFLAGS}', | 577 STRIPCOM='${STRIP} ${STRIPFLAGS}', |
| 578 TRANSLATEFLAGS='-Wl,-L${LIB_DIR}', |
| 579 TRANSLATECOM='${TRANSLATE} ${TRANSLATEFLAGS}', |
| 578 ) | 580 ) |
| 579 | 581 |
| 580 # Windows has a small limit on the command line size. The linking | 582 # Windows has a small limit on the command line size. The linking |
| 581 # commands can get quite large. So bring in the SCons machinery to put | 583 # commands can get quite large. So bring in the SCons machinery to put |
| 582 # most of a command line into a temporary file and pass it with | 584 # most of a command line into a temporary file and pass it with |
| 583 # @filename, which works with gcc. | 585 # @filename, which works with gcc. |
| 584 if env['PLATFORM'] in ['win32', 'cygwin']: | 586 if env['PLATFORM'] in ['win32', 'cygwin']: |
| 585 for com in ['LINKCOM', 'SHLINKCOM']: | 587 for com in ['LINKCOM', 'SHLINKCOM']: |
| 586 env[com] = "${TEMPFILE('%s')}" % env[com] | 588 env[com] = "${TEMPFILE('%s')}" % env[com] |
| 587 | 589 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 608 # Dependency files it produces are to be found in ${LIBPATH}. | 610 # Dependency files it produces are to be found in ${LIBPATH}. |
| 609 # It is applied recursively to those dependencies in case | 611 # It is applied recursively to those dependencies in case |
| 610 # some of them are linker scripts too. | 612 # some of them are linker scripts too. |
| 611 ldscript_scanner = SCons.Scanner.Base( | 613 ldscript_scanner = SCons.Scanner.Base( |
| 612 function=ScanLinkerScript, | 614 function=ScanLinkerScript, |
| 613 skeys=['.a', '.so', '.pso'], | 615 skeys=['.a', '.so', '.pso'], |
| 614 path_function=SCons.Scanner.FindPathDirs('LIBPATH'), | 616 path_function=SCons.Scanner.FindPathDirs('LIBPATH'), |
| 615 recursive=True | 617 recursive=True |
| 616 ) | 618 ) |
| 617 env.Append(SCANNERS=ldscript_scanner) | 619 env.Append(SCANNERS=ldscript_scanner) |
| OLD | NEW |