Blame SOURCES/include-configure-script.patch

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