| 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 # IMPORTANT NOTE: If you make local mods to this file, you must run: | 6 # IMPORTANT NOTE: If you make local mods to this file, you must run: |
| 7 # % tools/llvm/utman.sh driver | 7 # % tools/llvm/utman.sh driver |
| 8 # in order for them to take effect in the scons build. This command | 8 # in order for them to take effect in the scons build. This command |
| 9 # updates the copy in the toolchain/ tree. | 9 # updates the copy in the toolchain/ tree. |
| 10 # | 10 # |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 'PREFIXES' : '', # Prefixes specified by using the -B flag. | 109 'PREFIXES' : '', # Prefixes specified by using the -B flag. |
| 110 | 110 |
| 111 # Library Strings | 111 # Library Strings |
| 112 'EMITMODE' : '${STATIC ? static : ${SHARED ? shared : dynamic}}', | 112 'EMITMODE' : '${STATIC ? static : ${SHARED ? shared : dynamic}}', |
| 113 | 113 |
| 114 'LD_ARGS' : '${STDLIB ? ${LD_ARGS_%LIBMODE%_%EMITMODE%}' + | 114 'LD_ARGS' : '${STDLIB ? ${LD_ARGS_%LIBMODE%_%EMITMODE%}' + |
| 115 ' : ${LD_ARGS_nostdlib}}', | 115 ' : ${LD_ARGS_nostdlib}}', |
| 116 | 116 |
| 117 # ${ld_inputs} signifies where to place the objects and libraries | 117 # ${ld_inputs} signifies where to place the objects and libraries |
| 118 # provided on the command-line. | 118 # provided on the command-line. |
| 119 'LD_ARGS_nostdlib': '-barebones-link -nostdlib ${ld_inputs}', | 119 'LD_ARGS_nostdlib': '-nostdlib ${ld_inputs}', |
| 120 | 120 |
| 121 'LD_ARGS_newlib_static': | 121 'LD_ARGS_newlib_static': |
| 122 '-l:crt1.o -l:nacl_startup.bc ${ld_inputs} ' + | 122 '-l:crt1.o -l:nacl_startup.bc ${ld_inputs} ' + |
| 123 '--start-group -lgcc_eh -lgcc -lc -lnacl ' + | 123 '--start-group -lgcc_eh -lgcc -lc -lnacl ' + |
| 124 '${LIBSTDCPP} -l:libcrt_platform.a --end-group', | 124 '${LIBSTDCPP} -l:libcrt_platform.a --end-group', |
| 125 | 125 |
| 126 # The next three are copied verbatim from nacl-gcc | 126 # The next three are copied verbatim from nacl-gcc |
| 127 'LD_ARGS_glibc_static': | 127 'LD_ARGS_glibc_static': |
| 128 '-l:crt1.o -l:crti.o -l:crtbeginT.o ' + | 128 '-l:crt1.o -l:crti.o -l:crtbeginT.o ' + |
| 129 '${ld_inputs} ${LIBSTDCPP} ' + | 129 '${ld_inputs} ${LIBSTDCPP} ' + |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 chain.add(RunNativeAS, 'o') | 541 chain.add(RunNativeAS, 'o') |
| 542 cur_type = 'o' | 542 cur_type = 'o' |
| 543 if cur_type == output_type: | 543 if cur_type == output_type: |
| 544 return | 544 return |
| 545 | 545 |
| 546 Log.Fatal("Unable to compile .%s to .%s", input_type, output_type) | 546 Log.Fatal("Unable to compile .%s to .%s", input_type, output_type) |
| 547 | 547 |
| 548 | 548 |
| 549 if __name__ == "__main__": | 549 if __name__ == "__main__": |
| 550 DriverMain(main) | 550 DriverMain(main) |
| OLD | NEW |