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