Mercurial > lcfOS
diff python/ppci/buildfunctions.py @ 385:d056b552d3f4
Made better use of layout
author | Windel Bouwman |
---|---|
date | Thu, 01 May 2014 14:03:12 +0200 |
parents | 173e20a47fda |
children | 2a970e7270e2 |
line wrap: on
line diff
--- a/python/ppci/buildfunctions.py Sun Apr 27 17:50:25 2014 +0200 +++ b/python/ppci/buildfunctions.py Thu May 01 14:03:12 2014 +0200 @@ -19,6 +19,7 @@ from . import DiagnosticsManager, CompilerError from .tasks import TaskError + def fix_target(tg): """ Try to return an instance of the Target class """ if isinstance(tg, Target): @@ -122,14 +123,12 @@ return output -def link(objects, layout): +def link(objects, layout, target): """ Links the iterable of objects into one using the given layout """ objects = list(map(fix_object, objects)) layout = fix_layout(layout) - linker = Linker() + target = fix_target(target) + linker = Linker(target) output_obj = linker.link(objects, layout) return output_obj - -def objcopy(obj): - return