mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-08 11:56:08 +00:00

Instead of a new method for each variable any subclass might want to set, have a method getExtraMakeArgs that each subclass can use to return whatever extra Make arguments it wants. As per Pavel's suggestion in D85539.
46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
from .builder import Builder
|
|
|
|
from lldbsuite.test import configuration
|
|
|
|
|
|
class BuilderDarwin(Builder):
|
|
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()})
|
|
|
|
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),
|
|
self.getExtraMakeArgs(),
|
|
self.getSDKRootSpec(),
|
|
self.getModuleCacheSpec(), "all",
|
|
self.getCmdLine(dictionary)
|
|
])
|
|
|
|
self.runBuildCommands(commands, sender=sender)
|
|
|
|
# True signifies that we can handle building dsym.
|
|
return True
|