|
|
aeeb816 |
--- firefox-111.0.1/build/moz.configure/rust.configure 2023-03-21 06:16:03.000000000 -0700
|
|
|
aeeb816 |
+++ firefox-111.0.1/build/moz.configure/rust.configure.new 2023-04-05 08:57:29.403219120 -0700
|
|
|
aeeb816 |
@@ -593,7 +593,7 @@
|
|
|
aeeb816 |
|
|
|
aeeb816 |
# ==============================================================
|
|
|
aeeb816 |
|
|
|
aeeb816 |
-option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags")
|
|
|
aeeb816 |
+option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags", comma_split=False)
|
|
|
aeeb816 |
set_config("RUSTFLAGS", depends("RUSTFLAGS")(lambda flags: flags))
|
|
|
aeeb816 |
|
|
|
aeeb816 |
|
|
|
aeeb816 |
--- firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py 2023-03-21 06:16:09.000000000 -0700
|
|
|
aeeb816 |
+++ firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py.new 2023-04-05 08:57:31.270193468 -0700
|
|
|
aeeb816 |
@@ -191,6 +191,10 @@
|
|
|
aeeb816 |
to instantiate an option indirectly. Set this to a positive integer to
|
|
|
aeeb816 |
force the script to look into a deeper stack frame when inferring the
|
|
|
aeeb816 |
`category`.
|
|
|
aeeb816 |
+ - `comma_split` specifies whether the value string should be split on
|
|
|
aeeb816 |
+ commas. The default is True. Setting it False is necessary for things
|
|
|
aeeb816 |
+ like compiler flags which should be a single string that may contain
|
|
|
aeeb816 |
+ commas.
|
|
|
aeeb816 |
"""
|
|
|
aeeb816 |
|
|
|
aeeb816 |
__slots__ = (
|
|
|
aeeb816 |
@@ -205,6 +209,7 @@
|
|
|
aeeb816 |
"possible_origins",
|
|
|
aeeb816 |
"category",
|
|
|
aeeb816 |
"define_depth",
|
|
|
aeeb816 |
+ "comma_split",
|
|
|
aeeb816 |
)
|
|
|
aeeb816 |
|
|
|
aeeb816 |
def __init__(
|
|
|
aeeb816 |
@@ -218,6 +223,7 @@
|
|
|
aeeb816 |
category=None,
|
|
|
aeeb816 |
help=None,
|
|
|
aeeb816 |
define_depth=0,
|
|
|
aeeb816 |
+ comma_split=True,
|
|
|
aeeb816 |
):
|
|
|
aeeb816 |
if not name and not env:
|
|
|
aeeb816 |
raise InvalidOptionError(
|
|
|
aeeb816 |
@@ -335,9 +341,10 @@
|
|
|
aeeb816 |
self.choices = choices
|
|
|
aeeb816 |
self.help = help
|
|
|
aeeb816 |
self.category = category or _infer_option_category(define_depth)
|
|
|
aeeb816 |
+ self.comma_split = comma_split
|
|
|
aeeb816 |
|
|
|
aeeb816 |
@staticmethod
|
|
|
aeeb816 |
- def split_option(option):
|
|
|
aeeb816 |
+ def split_option(option, comma_split=True):
|
|
|
aeeb816 |
"""Split a flag or variable into a prefix, a name and values
|
|
|
aeeb816 |
|
|
|
aeeb816 |
Variables come in the form NAME=values (no prefix).
|
|
|
aeeb816 |
@@ -350,7 +357,13 @@
|
|
|
aeeb816 |
|
|
|
aeeb816 |
elements = option.split("=", 1)
|
|
|
aeeb816 |
name = elements[0]
|
|
|
aeeb816 |
- values = tuple(elements[1].split(",")) if len(elements) == 2 else ()
|
|
|
aeeb816 |
+ if len(elements) == 2:
|
|
|
aeeb816 |
+ if comma_split:
|
|
|
aeeb816 |
+ values = tuple(elements[1].split(","))
|
|
|
aeeb816 |
+ else:
|
|
|
aeeb816 |
+ values = (elements[1],)
|
|
|
aeeb816 |
+ else:
|
|
|
aeeb816 |
+ values = ()
|
|
|
aeeb816 |
if name.startswith("--"):
|
|
|
aeeb816 |
name = name[2:]
|
|
|
aeeb816 |
if not name.islower():
|
|
|
aeeb816 |
@@ -426,7 +439,7 @@
|
|
|
aeeb816 |
% (option, origin, ", ".join(self.possible_origins))
|
|
|
aeeb816 |
)
|
|
|
aeeb816 |
|
|
|
aeeb816 |
- prefix, name, values = self.split_option(option)
|
|
|
aeeb816 |
+ prefix, name, values = self.split_option(option, self.comma_split)
|
|
|
aeeb816 |
option = self._join_option(prefix, name)
|
|
|
aeeb816 |
|
|
|
aeeb816 |
assert name in (self.name, self.env)
|