compiler = lldbutil.which(compiler)
return os.path.abspath(compiler)
+ def getExtraMakeArgs(self):
+ """
+ Helper function to return extra argumentsfor the make system. This
+ method is meant to be overridden by platform specific builders.
+ """
+ return ""
+
def getMake(self, test_subdir, test_name):
"""Returns the invocation for GNU make.
The first argument is a tuple of the relative path to the testcase
else:
return ""
- def getDsymutilSpec(self):
- """
- Helper function to return the key-value string to specify the dsymutil
- used for the make system.
- """
- if configuration.dsymutil:
- return "DSYMUTIL={}".format(configuration.dsymutil)
- return ""
-
def getSDKRootSpec(self):
"""
Helper function to return the key-value string to specify the SDK root
"all",
self.getArchSpec(architecture),
self.getCCSpec(compiler),
- self.getDsymutilSpec(),
+ self.getExtraMakeArgs(),
self.getSDKRootSpec(),
self.getModuleCacheSpec(),
self.getCmdLine(dictionary)
"MAKE_DSYM=NO",
self.getArchSpec(architecture),
self.getCCSpec(compiler),
- self.getDsymutilSpec(),
+ self.getExtraMakeArgs(),
self.getSDKRootSpec(),
self.getModuleCacheSpec(),
self.getCmdLine(dictionary)
"MAKE_DSYM=NO", "MAKE_DWO=YES",
self.getArchSpec(architecture),
self.getCCSpec(compiler),
- self.getDsymutilSpec(),
+ self.getExtraMakeArgs(),
self.getSDKRootSpec(),
self.getModuleCacheSpec(),
self.getCmdLine(dictionary)
"MAKE_DSYM=NO", "MAKE_GMODULES=YES",
self.getArchSpec(architecture),
self.getCCSpec(compiler),
- self.getDsymutilSpec(),
+ self.getExtraMakeArgs(),
self.getSDKRootSpec(),
self.getModuleCacheSpec(),
self.getCmdLine(dictionary)
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,
"MAKE_DSYM=YES",
self.getArchSpec(architecture),
self.getCCSpec(compiler),
- self.getDsymutilSpec(),
+ self.getExtraMakeArgs(),
self.getSDKRootSpec(),
self.getModuleCacheSpec(), "all",
self.getCmdLine(dictionary)