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

Side by Side Diff: tests_lit/lit.cfg

Issue 515993002: Align function starts to target-specific bundle alignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: uint8_t Created 6 years, 3 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 | « src/IceTargetLoweringX8632.h ('k') | tests_lit/llvm2ice_tests/function_aligned.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Taken from utils/lit/tests in the LLVM tree and hacked together to support 1 # Taken from utils/lit/tests in the LLVM tree and hacked together to support
2 # our tests. 2 # our tests.
3 3
4 # -*- Python -*- 4 # -*- Python -*-
5 5
6 import os 6 import os
7 import re 7 import re
8 import sys 8 import sys
9 9
10 import lit.formats 10 import lit.formats
(...skipping 24 matching lines...) Expand all
35 # Finding Subzero tools 35 # Finding Subzero tools
36 llvm2icetool = os.path.join(bin_root, 'llvm2ice') 36 llvm2icetool = os.path.join(bin_root, 'llvm2ice')
37 config.substitutions.append( 37 config.substitutions.append(
38 ('%llvm2iceinsts', ' '.join([os.path.join(bin_root, 'llvm2iceinsts.py'), 38 ('%llvm2iceinsts', ' '.join([os.path.join(bin_root, 'llvm2iceinsts.py'),
39 '--llvm2ice', llvm2icetool, 39 '--llvm2ice', llvm2icetool,
40 '--llvm-bin-path', llvmbinpath 40 '--llvm-bin-path', llvmbinpath
41 ]))) 41 ])))
42 config.substitutions.append(('%llvm2ice', llvm2icetool)) 42 config.substitutions.append(('%llvm2ice', llvm2icetool))
43 config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py'))) 43 config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py')))
44 44
45 llvmbintools = [r"\bFileCheck\b", r"\bllvm-mc\b", r"\bnot\b", 45 llvmbintools = [r"\bFileCheck\b", r"\bllvm-mc\b", r"\bllvm-objdump\b",
46 r"\bpnacl-freeze\b"] 46 r"\bnot\b", r"\bpnacl-freeze\b"]
47 47
48 for tool in llvmbintools: 48 for tool in llvmbintools:
49 # The re.sub() line is adapted from one of LLVM's lit.cfg files. 49 # The re.sub() line is adapted from one of LLVM's lit.cfg files.
50 # Extract the tool name from the pattern. This relies on the tool 50 # Extract the tool name from the pattern. This relies on the tool
51 # name being surrounded by \b word match operators. If the 51 # name being surrounded by \b word match operators. If the
52 # pattern starts with "| ", include it in the string to be 52 # pattern starts with "| ", include it in the string to be
53 # substituted. 53 # substituted.
54 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$", 54 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
55 r"\2" + llvmbinpath + "/" + r"\4", 55 r"\2" + llvmbinpath + "/" + r"\4",
56 tool) 56 tool)
57 config.substitutions.append((tool, substitution)) 57 config.substitutions.append((tool, substitution))
58 58
59 # Add a feature to detect the Python version. 59 # Add a feature to detect the Python version.
60 config.available_features.add("python%d.%d" % (sys.version_info[0], 60 config.available_features.add("python%d.%d" % (sys.version_info[0],
61 sys.version_info[1])) 61 sys.version_info[1]))
62 62
63 # Debugging output 63 # Debugging output
64 def dbg(s): 64 def dbg(s):
65 print '[DBG] %s' % s 65 print '[DBG] %s' % s
66 66
67 dbg('bin_root = %s' % bin_root) 67 dbg('bin_root = %s' % bin_root)
68 dbg('llvmbinpath = %s' % llvmbinpath) 68 dbg('llvmbinpath = %s' % llvmbinpath)
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | tests_lit/llvm2ice_tests/function_aligned.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698