summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-09-14 11:34:24 -0700
committerDan Albert <danalbert@google.com>2017-09-14 11:35:02 -0700
commitbc2744c3818fe9142bb5b90af08004584a75c8d7 (patch)
tree30db3ee600d9af559c097d8debb4283d4e372dc4
parenta231f8846122acd245f790e5ce63501699fff4db (diff)
downloadgdb-bc2744c3818fe9142bb5b90af08004584a75c8d7.tar.gz
Don't use TMPDIR when building GDB.
Test: TMPDIR=foo ndk/checkbuild.py --module host-tools Bug: None Change-Id: Ia37d62443f59015be4d9aa00d535dfe750caa76d
-rwxr-xr-xbuild-gdb.sh8
-rwxr-xr-xbuild.py4
2 files changed, 10 insertions, 2 deletions
diff --git a/build-gdb.sh b/build-gdb.sh
index c3137a53d..e43d7294a 100755
--- a/build-gdb.sh
+++ b/build-gdb.sh
@@ -58,7 +58,7 @@ register_var_option "--build-dir=<path>" BUILD_DIR "Build GDB into directory"
PYTHON_VERSION=$DEFAULT_PYTHON_VERSION
register_var_option "--python-version=<version>" PYTHON_VERSION "Python version."
-PYTHON_BUILD_DIR="$TMPDIR/buildhost"
+PYTHON_BUILD_DIR=
register_var_option "--python-build-dir=<path>" PYTHON_BUILD_DIR "Python build directory."
NDK_DIR=$ANDROID_NDK_ROOT
@@ -95,7 +95,11 @@ for VERSION in $(commas_to_spaces $GDB_VERSION); do
done
if [ -z "$BUILD_DIR" ] ; then
- BUILD_DIR=$TMPDIR/buildgdb
+ panic "--build-dir is required"
+fi
+
+if [ -z "$PYTHON_BUILD_DIR" ] ; then
+ panic "--python-build-dir is required"
fi
bh_setup_build_dir $BUILD_DIR
diff --git a/build.py b/build.py
index 6fc1cee2a..279eef447 100755
--- a/build.py
+++ b/build.py
@@ -40,6 +40,10 @@ def main(args):
systems_arg, build_support.jobs_arg(),
]
+ build_cmd.append('--build-dir=' + os.path.join(args.out_dir, 'gdb'))
+ build_cmd.append(
+ '--python-build-dir=' + os.path.join(args.out_dir, 'python'))
+
print('Building {} gdb: {}'.format(args.host, ' '.join(arches)))
print(' '.join(build_cmd))
build_support.build(build_cmd, args, intermediate_package=True)