Blame SOURCES/include-configure-script.patch

b56797
From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001
b56797
From: Philip Chimento <philip.chimento@gmail.com>
b56797
Date: Wed, 5 Jul 2017 22:57:09 -0700
b56797
Subject: [PATCH] build: Include configure script, be nicer about options
b56797
b56797
A configure script is not included in the SpiderMonkey tarball by
b56797
default. Also, we have to account for JHbuild passing extra unknown
b56797
options like --disable-Werror.
b56797
b56797
https://bugzilla.mozilla.org/show_bug.cgi?id=1379540
b56797
---
b56797
 js/src/configure                               | 9 +++++++++
b56797
 python/mozbuild/mozbuild/configure/__init__.py | 2 +-
b56797
 python/mozbuild/mozbuild/configure/options.py  | 6 +++++-
b56797
 3 files changed, 15 insertions(+), 2 deletions(-)
b56797
 create mode 100755 js/src/configure
b56797
b56797
diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
b56797
index 0fe640ca..09b460d3 100644
b56797
--- a/python/mozbuild/mozbuild/configure/__init__.py
b56797
+++ b/python/mozbuild/mozbuild/configure/__init__.py
b56797
@@ -356,7 +356,7 @@ def run(self, path=None):
b56797
         # All options should have been removed (handled) by now.
b56797
         for arg in self._helper:
b56797
             without_value = arg.split('=', 1)[0]
b56797
-            raise InvalidOptionError('Unknown option: %s' % without_value)
b56797
+            print('Ignoring', without_value, ': Unknown option')
b56797
 
b56797
         # Run the execution queue
b56797
         for func, args in self._execution_queue:
b56797
diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
b56797
index 4310c862..15bfe425 100644
b56797
--- a/python/mozbuild/mozbuild/configure/options.py
b56797
+++ b/python/mozbuild/mozbuild/configure/options.py
b56797
@@ -402,7 +402,11 @@ def __init__(self, environ=os.environ, argv=sys.argv):
b56797
 
b56797
     def add(self, arg, origin='command-line', args=None):
b56797
         assert origin != 'default'
b56797
-        prefix, name, values = Option.split_option(arg)
b56797
+        try:
b56797
+            prefix, name, values = Option.split_option(arg)
b56797
+        except InvalidOptionError as e:
b56797
+            print('Ignoring', arg, ':', e)
b56797
+            return
b56797
         if args is None:
b56797
             args = self._extra_args
b56797
         if args is self._extra_args and name in self._extra_args:
b56797