Bug 1475390 - Fail configure if Tup is specified on a non-linux build. draft
authorChris Manchester <cmanchester@mozilla.com>
Fri, 13 Jul 2018 15:53:27 -0700
changeset 818369 7041f93a56be7afbcd37908273aa5d0a5bcea227
parent 817583 96c61b1dd0a1ecbc37fd4e257ff0bdff6f56df8b
push id116260
push userbmo:cmanchester@mozilla.com
push dateFri, 13 Jul 2018 22:53:47 +0000
bugs1475390
milestone63.0a1
Bug 1475390 - Fail configure if Tup is specified on a non-linux build. MozReview-Commit-ID: FO6wCbI7YwJ
build/moz.configure/tup.configure
--- a/build/moz.configure/tup.configure
+++ b/build/moz.configure/tup.configure
@@ -50,16 +50,22 @@ def tup_and_sccache(tup, using_sccache):
 
 @depends(tup, rustc_info)
 def check_tup_min_rustc_version(tup, rustc_info):
     min_rustc_version = Version('1.28.0')
     if tup and rustc_info.version < min_rustc_version:
         die('Cannot build with tup and rustc %s. please update to at least '
             'rustc %s to continue.', rustc_info.version, min_rustc_version)
 
+@depends(tup, target, build_project)
+def tup_and_non_linux(tup, target, build_project):
+    if tup and (target.kernel != 'Linux' or build_project != 'browser'):
+        die('The tup backend can only be used to build the browser on Linux. '
+            'Use the make backend until your target is supported.')
+
 option('--upload-tup-db', help= 'Upload the tup database from an automated build.')
 
 @depends('--upload-tup-db')
 def upload_tdb(value):
     if value:
         return True
 
 set_config('UPLOAD_TUP_DB', upload_tdb)