2020-08-19 08:27:54 -07:00
|
|
|
from .builder import Builder
|
|
|
|
|
2020-08-19 09:25:41 -07:00
|
|
|
from lldbsuite.test import configuration
|
|
|
|
|
2020-08-19 08:27:54 -07:00
|
|
|
|
|
|
|
class BuilderDarwin(Builder):
|
2020-08-19 09:25:41 -07:00
|
|
|
def getExtraMakeArgs(self):
|
|
|
|
"""
|
|
|
|
Helper function to return extra argumentsfor the make system. This
|
|
|
|
method is meant to be overridden by platform specific builders.
|
|
|
|
"""
|
|
|
|
args = dict()
|
|
|
|
|
|
|
|
if configuration.dsymutil:
|
|
|
|
args['DSYMUTIL'] = configuration.dsymutil
|
|
|
|
|
|
|
|
# Return extra args as a formatted string.
|
|
|
|
return ' '.join(
|
|
|
|
{'{}="{}"'.format(key, value)
|
|
|
|
for key, value in args.items()})
|
|
|
|
|
2020-08-19 08:27:54 -07:00
|
|
|
def buildDsym(self,
|
|
|
|
sender=None,
|
|
|
|
architecture=None,
|
|
|
|
compiler=None,
|
|
|
|
dictionary=None,
|
|
|
|
testdir=None,
|
|
|
|
testname=None):
|
|
|
|
"""Build the binaries with dsym debug info."""
|
|
|
|
commands = []
|
|
|
|
commands.append(
|
|
|
|
self.getMake(testdir, testname) + [
|
|
|
|
"MAKE_DSYM=YES",
|
|
|
|
self.getArchSpec(architecture),
|
|
|
|
self.getCCSpec(compiler),
|
2020-08-19 09:25:41 -07:00
|
|
|
self.getExtraMakeArgs(),
|
2020-08-19 08:27:54 -07:00
|
|
|
self.getSDKRootSpec(),
|
|
|
|
self.getModuleCacheSpec(), "all",
|
|
|
|
self.getCmdLine(dictionary)
|
|
|
|
])
|
|
|
|
|
|
|
|
self.runBuildCommands(commands, sender=sender)
|
|
|
|
|
|
|
|
# True signifies that we can handle building dsym.
|
|
|
|
return True
|