OLD | NEW |
1 # -*- Python -*- | 1 # -*- Python -*- |
2 # Taken from utils/lit/tests in the LLVM tree and hacked together to support | 2 # Taken from utils/lit/tests in the LLVM tree and hacked together to support |
3 # our tests. | 3 # our tests. |
4 # | 4 # |
5 # Note: This configuration has simple commands to run Subzero's translator. | 5 # Note: This configuration has simple commands to run Subzero's translator. |
6 # They have the form %X2i (i.e. %p2i, %l2i, and %lc2i) where X is defined | 6 # They have the form %X2i (i.e. %p2i, %l2i, and %lc2i) where X is defined |
7 # as follows: | 7 # as follows: |
8 # | 8 # |
9 # p : Run Subzero's translator, building ICE from PNaCl bitcode directly. | 9 # p : Run Subzero's translator, building ICE from PNaCl bitcode directly. |
10 # l : Run Subzero's translator, converting the .ll file to a PNaCl bitcode | 10 # l : Run Subzero's translator, converting the .ll file to a PNaCl bitcode |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 # shell conditional commands. | 80 # shell conditional commands. |
81 if_atts = [os.path.join(pydir, 'if.py')] | 81 if_atts = [os.path.join(pydir, 'if.py')] |
82 if_atts_cmd = if_atts + ['--have=' + att for att in pnacl_sz_atts] | 82 if_atts_cmd = if_atts + ['--have=' + att for att in pnacl_sz_atts] |
83 ifl2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir' in pnacl_sz_atts), | 83 ifl2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir' in pnacl_sz_atts), |
84 '--command'] | 84 '--command'] |
85 iflc2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir_as_input' | 85 iflc2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir_as_input' |
86 in pnacl_sz_atts), '--command'] | 86 in pnacl_sz_atts), '--command'] |
87 | 87 |
88 # Base command for running pnacl-sz | 88 # Base command for running pnacl-sz |
89 pnacl_sz_cmd = [os.path.join(pydir, 'run-pnacl-sz.py'), | 89 pnacl_sz_cmd = [os.path.join(pydir, 'run-pnacl-sz.py'), |
| 90 '--echo-cmd', |
90 '--pnacl-sz', pnacl_sz_tool, | 91 '--pnacl-sz', pnacl_sz_tool, |
91 '--pnacl-bin-path', pnaclbinpath] | 92 '--pnacl-bin-path', pnaclbinpath] |
92 if 'FORCEASM' in lit_config.params: | 93 if 'FORCEASM' in lit_config.params: |
93 pnacl_sz_cmd += ['--forceasm'] | 94 pnacl_sz_cmd += ['--forceasm'] |
94 | 95 |
95 # Run commands only if corresponding build attributes apply, including | 96 # Run commands only if corresponding build attributes apply, including |
96 # for each compiler setup. | 97 # for each compiler setup. |
97 config.substitutions.append(('%ifp', ' ')) | 98 config.substitutions.append(('%ifp', ' ')) |
98 config.substitutions.append(('%iflc', ' '.join(iflc2i_atts_cmd))) | 99 config.substitutions.append(('%iflc', ' '.join(iflc2i_atts_cmd))) |
99 config.substitutions.append(('%ifl', ' '.join(ifl2i_atts_cmd))) | 100 config.substitutions.append(('%ifl', ' '.join(ifl2i_atts_cmd))) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 config.available_features.add("python%d.%d" % (sys.version_info[0], | 135 config.available_features.add("python%d.%d" % (sys.version_info[0], |
135 sys.version_info[1])) | 136 sys.version_info[1])) |
136 | 137 |
137 # Debugging output | 138 # Debugging output |
138 def dbg(s): | 139 def dbg(s): |
139 print '[DBG] %s' % s | 140 print '[DBG] %s' % s |
140 | 141 |
141 dbg('bin_root = %s' % bin_root) | 142 dbg('bin_root = %s' % bin_root) |
142 dbg('pnaclbinpath = %s' % pnaclbinpath) | 143 dbg('pnaclbinpath = %s' % pnaclbinpath) |
143 dbg("Build attributes = %s" % pnacl_sz_atts) | 144 dbg("Build attributes = %s" % pnacl_sz_atts) |
OLD | NEW |