Skip to content

Commit c7558b7

Browse files
committed
Tinkering with output legibility.
1 parent 753fd2c commit c7558b7

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

wllvm/checker.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ def checkCompilers(self, cc, cxx):
198198
if not ccOk:
199199
print('The C compiler {0} was not found or not executable.\nBetter not try using wllvm!\n'.format(cc))
200200
else:
201-
print('The C compiler {0} is:\n\n{1}\n'.format(cc, extractLine(ccVersion, 0)))
201+
print('The C compiler {0} is:\n\n\t{1}\n'.format(cc, extractLine(ccVersion, 0)))
202202

203203
if not cxxOk:
204204
print('The CXX compiler {0} was not found or not executable.\nBetter not try using wllvm++!\n'.format(cxx))
205205
else:
206-
print('The C++ compiler {0} is:\n\n{1}\n'.format(cxx, extractLine(cxxVersion, 0)))
206+
print('The C++ compiler {0} is:\n\n\t{1}\n'.format(cxx, extractLine(cxxVersion, 0)))
207207

208208
if not ccOk or not cxxOk:
209209
print(explain_LLVM_COMPILER_PATH)
@@ -257,13 +257,13 @@ def checkAuxiliaries(self):
257257
print('The bitcode linker {0} was not found or not executable.\nBetter not try using extract-bc!\n'.format(link))
258258
print(explain_LLVM_LINK_NAME)
259259
else:
260-
print('The bitcode linker {0} is:\n\n{1}\n'.format(link, extractLine(linkVersion, 1)))
260+
print('The bitcode linker {0} is:\n\n\t{1}\n'.format(link, extractLine(linkVersion, 1)))
261261

262262
if not arOk:
263263
print('The bitcode archiver {0} was not found or not executable.\nBetter not try using extract-bc!\n'.format(ar))
264264
print(explain_LLVM_AR_NAME)
265265
else:
266-
print('The bitcode archiver {0} is:\n\n{1}\n'.format(ar, extractLine(arVersion, 1)))
266+
print('The bitcode archiver {0} is:\n\n\t{1}\n'.format(ar, extractLine(arVersion, 1)))
267267

268268

269269
def checkStore(self):
@@ -282,6 +282,5 @@ def extractLine(version, n):
282282
if not version:
283283
return version
284284
lines = version.split('\n')
285-
if n < len(lines):
286-
return lines[n]
287-
return lines[-1]
285+
line = lines[n] if n < len(lines) else lines[-1]
286+
return line.strip() if line else line

0 commit comments

Comments
 (0)