mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-02 21:22:44 +00:00
Unbreak windows bots
llvm-svn: 352086
This commit is contained in:
parent
66b62979b7
commit
03f9e25bb0
@ -1311,15 +1311,16 @@ class Base(unittest2.TestCase):
|
||||
|
||||
def getDwarfVersion(self):
|
||||
""" Returns the dwarf version generated by clang or 'unknown'. """
|
||||
if 'clang' not in self.getCompiler():
|
||||
return 'unknown'
|
||||
driver_output = check_output(
|
||||
[self.getCompiler()] + '-g -c -x c - -o - -###'.split(),
|
||||
stderr=STDOUT)
|
||||
for line in driver_output.split(os.linesep):
|
||||
m = re.search('dwarf-version=([0-9])', line)
|
||||
if m:
|
||||
return m.group(1)
|
||||
if 'clang' in self.getCompiler():
|
||||
try:
|
||||
driver_output = check_output(
|
||||
[self.getCompiler()] + '-g -c -x c - -o - -###'.split(),
|
||||
stderr=STDOUT)
|
||||
for line in driver_output.split(os.linesep):
|
||||
m = re.search('dwarf-version=([0-9])', line)
|
||||
if m:
|
||||
return m.group(1)
|
||||
except: pass
|
||||
return 'unknown'
|
||||
|
||||
def platformIsDarwin(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user