summaryrefslogtreecommitdiff
path: root/morphlib/buildcommand.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-25 11:45:30 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 15:20:02 +0000
commit92d98f57eaa6e0871b70d0d0ab1db879cf3ea47a (patch)
treee8d6629110f8c079c2d94b6f1e3fe8e239b9fd43 /morphlib/buildcommand.py
parentece7f823de6bd61a0676edf71a9525697848824e (diff)
downloadmorph-92d98f57eaa6e0871b70d0d0ab1db879cf3ea47a.tar.gz
Set environment variables defining target for build-essential
In the future we will allow this to be modified to provide a cross-bootstrap mode, but for now we use the same target as the host compiler.
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r--morphlib/buildcommand.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index 56c7fae8..ca097145 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -33,12 +33,14 @@ class BuildCommand(object):
'''
def __init__(self, app):
+ self.supports_local_build = True
+ self.target = morphlib.util.target(app.runcmd)
+
self.app = app
self.build_env = self.new_build_env()
self.ckc = self.new_cache_key_computer(self.build_env)
self.lac, self.rac = self.new_artifact_caches()
self.lrc, self.rrc = self.new_repo_caches()
- self.supports_local_build = True
def build(self, args):
'''Build triplets specified on command line.'''
@@ -55,7 +57,8 @@ class BuildCommand(object):
def new_build_env(self):
'''Create a new BuildEnvironment instance.'''
- return morphlib.buildenvironment.BuildEnvironment(self.app.settings)
+ return morphlib.buildenvironment.BuildEnvironment(self.app.settings,
+ self.target)
def new_cache_key_computer(self, build_env):
'''Create a new cache key computer.'''