| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 # Add build attributes of llvm2ice tool to the set of available features. | 74 # Add build attributes of llvm2ice tool to the set of available features. |
| 75 config.available_features.update(llvm2iceatts) | 75 config.available_features.update(llvm2iceatts) |
| 76 | 76 |
| 77 def if_cond_flag(Value): | 77 def if_cond_flag(Value): |
| 78 return '--cond=true' if Value else '--cond=false' | 78 return '--cond=true' if Value else '--cond=false' |
| 79 | 79 |
| 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 | 82 if_atts_cmd = if_atts + ['--have=' + att |
| 83 for att in llvm2iceatts] + ['--command'] | 83 for att in llvm2iceatts] |
| 84 ifl2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir' in llvm2iceatts), | 84 ifl2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir' in llvm2iceatts), |
| 85 '--command'] | 85 '--command'] |
| 86 iflc2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir_as_input' | 86 iflc2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir_as_input' |
| 87 in llvm2iceatts), '--command'] | 87 in llvm2iceatts), '--command'] |
| 88 | 88 |
| 89 # Base command for running llvm2ice | 89 # Base command for running llvm2ice |
| 90 llvm2ice_cmd = [os.path.join(pydir, 'run-llvm2ice.py'), | 90 llvm2ice_cmd = [os.path.join(pydir, 'run-llvm2ice.py'), |
| 91 '--llvm2ice', llvm2icetool, | 91 '--llvm2ice', llvm2icetool, |
| 92 '--llvm-bin-path', llvmbinpath] | 92 '--llvm-bin-path', llvmbinpath] |
| 93 | 93 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 config.available_features.add("python%d.%d" % (sys.version_info[0], | 126 config.available_features.add("python%d.%d" % (sys.version_info[0], |
| 127 sys.version_info[1])) | 127 sys.version_info[1])) |
| 128 | 128 |
| 129 # Debugging output | 129 # Debugging output |
| 130 def dbg(s): | 130 def dbg(s): |
| 131 print '[DBG] %s' % s | 131 print '[DBG] %s' % s |
| 132 | 132 |
| 133 dbg('bin_root = %s' % bin_root) | 133 dbg('bin_root = %s' % bin_root) |
| 134 dbg('llvmbinpath = %s' % llvmbinpath) | 134 dbg('llvmbinpath = %s' % llvmbinpath) |
| 135 dbg("Build attributes = %s" % llvm2iceatts) | 135 dbg("Build attributes = %s" % llvm2iceatts) |
| OLD | NEW |