Source code for benchbuild.projects.benchbuild.tcc

from os import path

from plumbum import local

from benchbuild import project
from benchbuild.utils import compiler, download, run, wrapping
from benchbuild.utils.cmd import make, mkdir, tar

[docs]@download.with_wget({ '0.9.26': '' }) class TCC(project.Project): NAME = 'tcc' DOMAIN = 'compilation' GROUP = 'benchbuild' VERSION = '0.9.26' SRC_FILE = 'tcc.tar.bz2'
[docs] def compile(self): tar("xf", self.src_file) unpack_dir = local.path('tcc-{0}.tar.bz2'.format(self.version)) clang = with local.cwd(unpack_dir): mkdir("build") with local.cwd("build"): configure = local["../configure"]["--cc=" + str(clang), "--with-libgcc"])
[docs] def run_tests(self, runner): unpack_dir = local.path('tcc-{0}.tar.bz2'.format(self.version)) with local.cwd(unpack_dir): with local.cwd("build"): wrapping.wrap("tcc", self) inc_path = path.abspath("..") runner(make["TCCFLAGS=-B{}".format(inc_path), "test", "-i"])