aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2016-05-03 19:45:42 -0400
committerMike Frysinger <vapier@google.com>2016-05-04 19:32:10 -0400
commite99a6abe183ffa2d5fa7732933f82c5686769acc (patch)
tree6af3d4e4d2e41ca3d0e33969591b48698fcc8d31
parent47a520ca49612c6249ce563c143b167304aee83b (diff)
downloadbdk-e99a6abe183ffa2d5fa7732933f82c5686769acc.tar.gz
build: export OUT_DIR to all tools
The current wrapping logic lets the default OUT_DIR be used when setting up the env which means later commands will search out/. It's then passed in directly to `make` to override things to the custom path. Export the var instead for all commands. In practice, this might not make much of a difference, but it can cause really confusing behavior when adding more commands to this shell chain as it searches a completely different (possibly already existing) build tree. Bug: 27808605 Test: build platform still works Change-Id: Id8e127da7fe4ef0abce407dbdedf63842bccbb6e
-rw-r--r--cli/lib/core/build.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/lib/core/build.py b/cli/lib/core/build.py
index 1db3cdb..a05c881 100644
--- a/cli/lib/core/build.py
+++ b/cli/lib/core/build.py
@@ -49,13 +49,11 @@ def _GetBuildScript(platform, extra_make_args=None):
A string shell script that will build the platform.
"""
make_args = []
-
- make_args.append('OUT_DIR="{}"'.format(platform.build_cache))
-
if extra_make_args:
make_args.extend(extra_make_args)
cmds = ['cd "{}"'.format(platform.os_path()),
+ 'export OUT_DIR="{}"'.format(platform.build_cache),
'. build/envsetup.sh',
'lunch "{}-{}"'.format(platform.device.name, platform.build_type),
'm {}'.format(' '.join(make_args))]