Mercurial > lcfOS
comparison python/zcc.py @ 366:39bf68bf1891
Fix sample tests and deterministic build
author | Windel Bouwman |
---|---|
date | Fri, 21 Mar 2014 09:43:01 +0100 |
parents | c2ddc8a36f5e |
children | 9667d78ba79e |
comparison
equal
deleted
inserted
replaced
365:98ff43cfdd36 | 366:39bf68bf1891 |
---|---|
7 | 7 |
8 from ppci.buildtasks import Compile, Assemble, Link | 8 from ppci.buildtasks import Compile, Assemble, Link |
9 from ppci.tasks import TaskRunner | 9 from ppci.tasks import TaskRunner |
10 from ppci.report import RstFormatter | 10 from ppci.report import RstFormatter |
11 from ppci.objectfile import ObjectFile | 11 from ppci.objectfile import ObjectFile |
12 from ppci.target.target_list import target_list | 12 from ppci.target.target_list import targets, targetnames |
13 from ppci.recipe import RecipeLoader | 13 from ppci.recipe import RecipeLoader |
14 import ppci | 14 import ppci |
15 | 15 |
16 | 16 |
17 def logLevel(s): | 17 def logLevel(s): |
19 numeric_level = getattr(logging, s.upper(), None) | 19 numeric_level = getattr(logging, s.upper(), None) |
20 if not isinstance(numeric_level, int): | 20 if not isinstance(numeric_level, int): |
21 raise ValueError('Invalid log level: {}'.format(s)) | 21 raise ValueError('Invalid log level: {}'.format(s)) |
22 return numeric_level | 22 return numeric_level |
23 | 23 |
24 | |
25 targets = {t.name: t for t in target_list} | |
26 targetnames = list(targets.keys()) | |
27 | 24 |
28 def make_parser(): | 25 def make_parser(): |
29 parser = argparse.ArgumentParser(description='lcfos Compiler') | 26 parser = argparse.ArgumentParser(description='lcfos Compiler') |
30 | 27 |
31 parser.add_argument('--log', help='Log level (INFO,DEBUG,[WARN])', | 28 parser.add_argument('--log', help='Log level (INFO,DEBUG,[WARN])', |