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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 echo=False).split() | 72 echo=False).split() |
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 for att in llvm2iceatts] |
83 for att in llvm2iceatts] + ['--command'] | |
84 ifl2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir' in llvm2iceatts), | 83 ifl2i_atts_cmd = if_atts + [if_cond_flag('allow_llvm_ir' in llvm2iceatts), |
85 '--command'] | 84 '--command'] |
86 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' |
87 in llvm2iceatts), '--command'] | 86 in llvm2iceatts), '--command'] |
88 | 87 |
89 # Base command for running llvm2ice | 88 # Base command for running llvm2ice |
90 llvm2ice_cmd = [os.path.join(pydir, 'run-llvm2ice.py'), | 89 llvm2ice_cmd = [os.path.join(pydir, 'run-llvm2ice.py'), |
91 '--llvm2ice', llvm2icetool, | 90 '--llvm2ice', llvm2icetool, |
92 '--llvm-bin-path', llvmbinpath] | 91 '--llvm-bin-path', llvmbinpath] |
93 | 92 |
(...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], | 125 config.available_features.add("python%d.%d" % (sys.version_info[0], |
127 sys.version_info[1])) | 126 sys.version_info[1])) |
128 | 127 |
129 # Debugging output | 128 # Debugging output |
130 def dbg(s): | 129 def dbg(s): |
131 print '[DBG] %s' % s | 130 print '[DBG] %s' % s |
132 | 131 |
133 dbg('bin_root = %s' % bin_root) | 132 dbg('bin_root = %s' % bin_root) |
134 dbg('llvmbinpath = %s' % llvmbinpath) | 133 dbg('llvmbinpath = %s' % llvmbinpath) |
135 dbg("Build attributes = %s" % llvm2iceatts) | 134 dbg("Build attributes = %s" % llvm2iceatts) |
OLD | NEW |