targets/toolchain_gcc.py
changeset 1329 9d0cb01312f0
parent 1315 ff14a66bbd12
child 1511 91538d0c242c
equal deleted inserted replaced
1288:adc79fc44079 1329:9d0cb01312f0
    17     
    17     
    18     def getBuilderCFLAGS(self):
    18     def getBuilderCFLAGS(self):
    19         """
    19         """
    20         Returns list of builder specific CFLAGS
    20         Returns list of builder specific CFLAGS
    21         """
    21         """
    22         return [self.CTRInstance.GetTarget().getcontent()["value"].getCFLAGS()]
    22         return [self.CTRInstance.GetTarget().getcontent().getCFLAGS()]
    23 
    23 
    24     def getBuilderLDFLAGS(self):
    24     def getBuilderLDFLAGS(self):
    25         """
    25         """
    26         Returns list of builder specific LDFLAGS
    26         Returns list of builder specific LDFLAGS
    27         """
    27         """
    28         return self.CTRInstance.LDFLAGS + \
    28         return self.CTRInstance.LDFLAGS + \
    29                [self.CTRInstance.GetTarget().getcontent()["value"].getLDFLAGS()]
    29                [self.CTRInstance.GetTarget().getcontent().getLDFLAGS()]
    30 
    30 
    31     def GetBinaryCode(self):
    31     def GetBinaryCode(self):
    32         try:
    32         try:
    33             return open(self.exe_path, "rb").read()
    33             return open(self.exe_path, "rb").read()
    34         except Exception, e:
    34         except Exception, e:
    87         # TODO detect cicular deps.
    87         # TODO detect cicular deps.
    88         return reduce(operator.and_, map(self.check_and_update_hash_and_deps, deps), match)
    88         return reduce(operator.and_, map(self.check_and_update_hash_and_deps, deps), match)
    89                 
    89                 
    90     def build(self):
    90     def build(self):
    91         # Retrieve toolchain user parameters
    91         # Retrieve toolchain user parameters
    92         toolchain_params = self.CTRInstance.GetTarget().getcontent()["value"]
    92         toolchain_params = self.CTRInstance.GetTarget().getcontent()
    93         self.compiler = toolchain_params.getCompiler()
    93         self.compiler = toolchain_params.getCompiler()
    94         self.linker = toolchain_params.getLinker()
    94         self.linker = toolchain_params.getLinker()
    95 
    95 
    96         Builder_CFLAGS = ' '.join(self.getBuilderCFLAGS())
    96         Builder_CFLAGS = ' '.join(self.getBuilderCFLAGS())
    97 
    97