Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: pydir/crosstest.py

Issue 1185703006: Build ARM SZ runtime files. Use le32-nacl-objcopy in various places. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pydir/build-runtime.py ('k') | pydir/szbuild.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 from utils import shellcmd 9 from utils import shellcmd
10 from utils import FindBaseNaCl 10 from utils import FindBaseNaCl
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 '-o=' + obj_sz, 124 '-o=' + obj_sz,
125 asm_sz]) 125 asm_sz])
126 # Each separately translated Subzero object file contains its own 126 # Each separately translated Subzero object file contains its own
127 # definition of the __Sz_block_profile_info profiling symbol. Avoid 127 # definition of the __Sz_block_profile_info profiling symbol. Avoid
128 # linker errors (multiply defined symbol) by making all copies weak. 128 # linker errors (multiply defined symbol) by making all copies weak.
129 # (This could also be done by Subzero if it supported weak symbol 129 # (This could also be done by Subzero if it supported weak symbol
130 # definitions.) This approach should be OK because cross tests are 130 # definitions.) This approach should be OK because cross tests are
131 # currently the only situation where multiple translated files are 131 # currently the only situation where multiple translated files are
132 # linked into the executable, but when PNaCl supports shared nexe 132 # linked into the executable, but when PNaCl supports shared nexe
133 # libraries, this would need to change. 133 # libraries, this would need to change.
134 shellcmd(['objcopy', '--weaken-symbol=__Sz_block_profile_info', obj_sz]) 134 shellcmd(['{bin}/le32-nacl-objcopy'.format(bin=bindir),
135 '--weaken-symbol=__Sz_block_profile_info', obj_sz])
135 objs.append(obj_sz) 136 objs.append(obj_sz)
136 if args.crosstest_bitcode: 137 if args.crosstest_bitcode:
137 shellcmd(['{bin}/pnacl-llc'.format(bin=bindir), 138 shellcmd(['{bin}/pnacl-llc'.format(bin=bindir),
138 '-mtriple=' + triple, 139 '-mtriple=' + triple,
139 # Use sse2 instructions regardless of input -mattr 140 # Use sse2 instructions regardless of input -mattr
140 # argument to avoid differences in (undefined) behavior of 141 # argument to avoid differences in (undefined) behavior of
141 # converting NaN to int. 142 # converting NaN to int.
142 '-mattr=sse2', 143 '-mattr=sse2',
143 '-externalize', 144 '-externalize',
144 '-filetype=obj', 145 '-filetype=obj',
(...skipping 16 matching lines...) Expand all
161 sb_native_args = (['-O0', '--pnacl-allow-native', '-arch', 'x8632', 162 sb_native_args = (['-O0', '--pnacl-allow-native', '-arch', 'x8632',
162 '-Wn,-defsym=__Sz_AbsoluteZero=0'] 163 '-Wn,-defsym=__Sz_AbsoluteZero=0']
163 if args.sandbox else 164 if args.sandbox else
164 ['-g', '-m32', '-lm', '-lpthread', 165 ['-g', '-m32', '-lm', '-lpthread',
165 '-Wl,--defsym=__Sz_AbsoluteZero=0']) 166 '-Wl,--defsym=__Sz_AbsoluteZero=0'])
166 shellcmd([compiler, args.driver] + objs + 167 shellcmd([compiler, args.driver] + objs +
167 ['-o', os.path.join(args.dir, args.output)] + sb_native_args) 168 ['-o', os.path.join(args.dir, args.output)] + sb_native_args)
168 169
169 if __name__ == '__main__': 170 if __name__ == '__main__':
170 main() 171 main()
OLDNEW
« no previous file with comments | « pydir/build-runtime.py ('k') | pydir/szbuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698