summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Smyth <phillipsmyth@Nexus-x240.dyn.ducie.codethink.co.uk>2018-05-29 13:47:30 +0100
committerknownexus <phillip.smyth@codethink.co.uk>2018-07-23 12:25:33 +0100
commit7dfc1b36293850582c4f69f9d969bdc2154b5df8 (patch)
tree224f276bb69d951efa38f75f7c092a2099816622
parentb662f17582bd6bfd3bacabfceb4250984ced9df7 (diff)
downloadbuildstream-caching_build_trees_limited.tar.gz
Adding caching build treescaching_build_trees_limited
_project.py: Adding cache-build-tree to node validate element.py: Adding cache-build-tree variable data/projectconfig.yaml: Adding cache-build-tree variable
-rw-r--r--buildstream/_versions.py2
-rw-r--r--buildstream/element.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/buildstream/_versions.py b/buildstream/_versions.py
index 4b1bc7ec2..28f00f8ca 100644
--- a/buildstream/_versions.py
+++ b/buildstream/_versions.py
@@ -33,4 +33,4 @@ BST_FORMAT_VERSION = 9
# or if buildstream was changed in a way which can cause
# the same cache key to produce something that is no longer
# the same.
-BST_CORE_ARTIFACT_VERSION = 2
+BST_CORE_ARTIFACT_VERSION = 3
diff --git a/buildstream/element.py b/buildstream/element.py
index 5da14a93d..0cf950b83 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1500,6 +1500,11 @@ class Element(Plugin):
# Hard link files from collect dir to files directory
utils.link_files(collectdir, filesdir)
+ # Copy build tree contents
+ sandbox_build_dir = os.path.join(sandbox_root, self.get_variable('build-root').lstrip(os.sep))
+ if os.path.isdir(sandbox_build_dir):
+ shutil.copytree(sandbox_build_dir, os.path.join(assembledir, 'buildtree'))
+
# Copy build log
log_filename = context.get_log_filename()
if log_filename: