def compileReferenceFile(self, inputFile, outputFile, flags): tool = self.getTool(inputFile) return self.runTool([ mx_sulong.findLLVMProgram(tool, ['3.8', '3.9']), '-o', outputFile ] + flags + [inputFile], errorMsg='Cannot compile %s with %s' % (inputFile, tool))
def run(self, inputFile, outputFile, flags): tool = self.getTool(inputFile) return self.runTool([ mx_sulong.findLLVMProgram(tool, ['3.8', '3.9', '4.0']), '-c', '-emit-llvm', '-o', outputFile ] + flags + [inputFile], errorMsg='Cannot compile %s with %s' % (inputFile, tool))
def run(self, inputFile, outputFile, flags): tool = self.getTool(inputFile) program = mx_sulong.findLLVMProgram(tool) implicitArgs = self.getImplicitArgs(tool, program) return self.runTool([program, '-c', '-emit-llvm', '-o', outputFile] + flags + [inputFile] + implicitArgs, errorMsg='Cannot compile %s with %s' % (inputFile, tool))
def run(self, inputFile, outputFile, flags): tool, toolFlags = self.getTool(inputFile, outputFile) ret = self.runTool([ tool, '-S', '-fplugin=' + mx_sulong.dragonEggPath(), '-fplugin-arg-dragonegg-emit-ir', '-o', '%s.tmp.ll' % outputFile ] + toolFlags + flags + [inputFile], errorMsg='Cannot compile %s with %s' % (inputFile, os.path.basename(tool))) if ret == 0: ret = self.runTool([ mx_sulong.findLLVMProgram('llvm-as', ['3.2']), '-o', outputFile, '%s.tmp.ll' % outputFile ], errorMsg='Cannot assemble %s with llvm-as' % inputFile) return ret
def compiler_name(self): mx_sulong.ensureLLVMBinariesExist() return mx_sulong.findLLVMProgram('clang')
def run(self, inputFile, outputFile, flags): return mx.run([ mx_sulong.findLLVMProgram('opt', ['3.8', '3.9', '4.0']), '-o', outputFile ] + self.passes + [inputFile])
def compiler_name(self): mx_sulong.ensureLLVMBinariesExist() return mx_sulong.findLLVMProgram(mx_buildtools.ClangCompiler.CLANG)
def find_tool(self): return mx_sulong.findLLVMProgram('lli', self.supportedVersions)
def run(self, inputFile, outputFile, flags): return mx.run([mx_sulong.findLLVMProgram('opt'), '-o', outputFile] + self.passes + [inputFile])
def compileReferenceFile(self, inputFile, outputFile, flags): tool = self.getTool(inputFile) return self.runTool([mx_sulong.findLLVMProgram(tool), '-o', outputFile] + flags + [inputFile], errorMsg='Cannot compile %s with %s' % (inputFile, tool))
def run(self, inputFile, outputFile, flags): tool = self.getTool(inputFile) return self.runTool([mx_sulong.findLLVMProgram(tool), '-c', '-S', '-emit-llvm', '-o', outputFile] + flags + [inputFile], errorMsg='Cannot compile %s with %s' % (inputFile, tool))