| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 'EMUL' : '${EMUL_%ARCH%}', | 115 'EMUL' : '${EMUL_%ARCH%}', |
| 116 'EMUL_ARM' : 'armelf_nacl', | 116 'EMUL_ARM' : 'armelf_nacl', |
| 117 'EMUL_X8632' : 'elf_nacl', | 117 'EMUL_X8632' : 'elf_nacl', |
| 118 'EMUL_X8664' : 'elf64_nacl', | 118 'EMUL_X8664' : 'elf64_nacl', |
| 119 | 119 |
| 120 # ${ld_inputs} signifies where to place the objects and libraries | 120 # ${ld_inputs} signifies where to place the objects and libraries |
| 121 # provided on the command-line. | 121 # provided on the command-line. |
| 122 'LD_ARGS_nostdlib': '-barebones-link ${ld_inputs}', | 122 'LD_ARGS_nostdlib': '-barebones-link ${ld_inputs}', |
| 123 | 123 |
| 124 'LD_ARGS_newlib_static': | 124 'LD_ARGS_newlib_static': |
| 125 '-static ${LIBS}/crt1.o ${LIBS_BC}/nacl_startup.bc ${ld_inputs} ' + | 125 '-static ${LIBS_BC}/crt1.bc ${LIBS_BC}/nacl_startup.bc ${ld_inputs} ' + |
| 126 '--start-group -lgcc_eh -lgcc -lehsupport -lc -lnacl ' + | 126 '--start-group -lgcc_eh -lgcc -lehsupport -lc -lnacl ' + |
| 127 '${LIBSTDCPP} ${LIBS}/libcrt_platform.a --end-group', | 127 '${LIBSTDCPP} ${LIBS}/libcrt_platform.a --end-group', |
| 128 | 128 |
| 129 # The next three are copied verbatim from nacl-gcc | 129 # The next three are copied verbatim from nacl-gcc |
| 130 'LD_ARGS_glibc_static': | 130 'LD_ARGS_glibc_static': |
| 131 '-T ${LIBS}/${EMUL}.x.static ' + | 131 '-T ${LIBS}/${EMUL}.x.static ' + |
| 132 '${LIBS}/crt1.o ${LIBS}/crti.o ${LIBS}/crtbeginT.o ' + | 132 '${LIBS}/crt1.o ${LIBS}/crti.o ${LIBS}/crtbeginT.o ' + |
| 133 '${ld_inputs} ${LIBSTDCPP} ' + | 133 '${ld_inputs} ${LIBSTDCPP} ' + |
| 134 '--start-group -lgcc -lgcc_eh -lehsupport -lc ' + | 134 '--start-group -lgcc -lgcc_eh -lehsupport -lc ' + |
| 135 '--end-group ${LIBS}/crtend.o ${LIBS}/crtn.o', | 135 '--end-group ${LIBS}/crtend.o ${LIBS}/crtn.o', |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 chain.add(RunNativeAS, 'o') | 511 chain.add(RunNativeAS, 'o') |
| 512 cur_type = 'o' | 512 cur_type = 'o' |
| 513 if cur_type == output_type: | 513 if cur_type == output_type: |
| 514 return | 514 return |
| 515 | 515 |
| 516 Log.Fatal("Unable to compile .%s to .%s", input_type, output_type) | 516 Log.Fatal("Unable to compile .%s to .%s", input_type, output_type) |
| 517 | 517 |
| 518 | 518 |
| 519 if __name__ == "__main__": | 519 if __name__ == "__main__": |
| 520 DriverMain(main) | 520 DriverMain(main) |
| OLD | NEW |