summaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
author Michael Sun <michaelfsun@google.com> 2022-09-15 16:08:24 -0700
committer Michael Sun <michaelfsun@google.com> 2022-09-15 16:11:12 -0700
commit4940f2bc14ab0a1dd64b35ddd98e05eebf3d65fb (patch)
tree6aa30721c8f087f84c5760a8a0b571f717093e0f /build.py
parenta77c50c6599c26505931539fdfe618ba2f363f65 (diff)
floss: refuse to build if bootstrapped for a different project
Stop the build if the bootstrapped project is different than the one building, and warn the user to rerun the bootstrap. Bug: 247004173 Test: ./build.py Change-Id: Ia98d28d55014fcb9ff8e484e078e329903b071a9
Diffstat (limited to 'build.py')
-rwxr-xr-xbuild.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.py b/build.py
index f423de55be..994e00a9da 100755
--- a/build.py
+++ b/build.py
@@ -192,10 +192,14 @@ class HostBuild():
# Output and platform directories are based on bootstrap
self.output_dir = os.path.join(self.bootstrap_dir, 'output')
self.platform_dir = os.path.join(self.bootstrap_dir, 'staging')
+ self.bt_dir = os.path.join(self.platform_dir, 'bt')
self.sysroot = self.args.sysroot
self.libdir = self.args.libdir
self.install_dir = os.path.join(self.output_dir, 'install')
+ assert os.path.samefile(self.bt_dir,
+ os.path.dirname(__file__)), "Please rerun bootstrap for the current project!"
+
# If default target isn't set, build everything
self.target = 'all'
if hasattr(self.args, 'target') and self.args.target: