Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
| 2 | 2 |
| 3 import argparse | 3 import argparse |
| 4 import os | 4 import os |
| 5 import subprocess | 5 import subprocess |
| 6 import sys | 6 import sys |
| 7 import tempfile | 7 import tempfile |
| 8 | 8 |
| 9 import targets | 9 import targets |
| 10 from szbuild import LinkNonsfi | 10 from szbuild import LinkNonsfi |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 '--sandbox=' + str(args.sandbox), | 151 '--sandbox=' + str(args.sandbox), |
| 152 '--nonsfi=' + str(args.nonsfi), | 152 '--nonsfi=' + str(args.nonsfi), |
| 153 '--prefix=' + args.prefix, | 153 '--prefix=' + args.prefix, |
| 154 '-allow-uninitialized-globals', | 154 '-allow-uninitialized-globals', |
| 155 '-externalize', | 155 '-externalize', |
| 156 '-filetype=' + args.filetype, | 156 '-filetype=' + args.filetype, |
| 157 '-o=' + (obj_sz if args.filetype == 'obj' else asm_sz), | 157 '-o=' + (obj_sz if args.filetype == 'obj' else asm_sz), |
| 158 bitcode] + arch_sz_flags[args.target]) | 158 bitcode] + arch_sz_flags[args.target]) |
| 159 if args.filetype != 'obj': | 159 if args.filetype != 'obj': |
| 160 shellcmd(['{bin}/llvm-mc'.format(bin=bindir), | 160 shellcmd(['{bin}/llvm-mc'.format(bin=bindir), |
| 161 '-triple=' + triple, | 161 '-triple=' + ('mipsel-linux-gnu' |
|
Jim Stichnoth
2016/11/21 20:08:39
Is it possible to use a nacl-specific tuple for MI
Stefan Maksimovic
2016/11/22 11:38:13
This change stems from the fact that when we run t
Jim Stichnoth
2016/11/22 18:25:30
Ah, OK, that's very interesting. Thanks for the e
| |
| 162 if args.target == 'mips32' and args.sandbox | |
| 163 else triple), | |
| 162 '-filetype=obj', | 164 '-filetype=obj', |
| 163 '-o=' + obj_sz, | 165 '-o=' + obj_sz, |
| 164 asm_sz]) | 166 asm_sz]) |
| 165 | 167 |
| 166 # Each separately translated Subzero object file contains its own | 168 # Each separately translated Subzero object file contains its own |
| 167 # definition of the __Sz_block_profile_info profiling symbol. Avoid | 169 # definition of the __Sz_block_profile_info profiling symbol. Avoid |
| 168 # linker errors (multiply defined symbol) by making all copies weak. | 170 # linker errors (multiply defined symbol) by making all copies weak. |
| 169 # (This could also be done by Subzero if it supported weak symbol | 171 # (This could also be done by Subzero if it supported weak symbol |
| 170 # definitions.) This approach should be OK because cross tests are | 172 # definitions.) This approach should be OK because cross tests are |
| 171 # currently the only situation where multiple translated files are | 173 # currently the only situation where multiple translated files are |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 objs.append(obj_llc) | 272 objs.append(obj_llc) |
| 271 if args.nonsfi: | 273 if args.nonsfi: |
| 272 LinkNonsfi(objs, os.path.join(args.dir, args.output), args.target) | 274 LinkNonsfi(objs, os.path.join(args.dir, args.output), args.target) |
| 273 elif args.sandbox: | 275 elif args.sandbox: |
| 274 LinkSandbox(objs, os.path.join(args.dir, args.output), args.target) | 276 LinkSandbox(objs, os.path.join(args.dir, args.output), args.target) |
| 275 else: | 277 else: |
| 276 LinkNative(objs, os.path.join(args.dir, args.output), args.target) | 278 LinkNative(objs, os.path.join(args.dir, args.output), args.target) |
| 277 | 279 |
| 278 if __name__ == '__main__': | 280 if __name__ == '__main__': |
| 279 main() | 281 main() |
| OLD | NEW |