[libcxx-commits] [libcxx] [libcxx] Work around picolibc argv handling in tests. (PR #127662)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 19 11:31:53 PST 2025


================
@@ -274,23 +274,38 @@ def hasAnyLocale(config, locales):
     %{exec} -- this means that the command may be executed on a remote host
     depending on the %{exec} substitution.
     """
-    program = """
+
+    # Convert the locale names into C string literals, by escaping \
+    # and " and wrapping each one in double quotes.
+    name_string_literals = ", ".join(
+        '"' + locale.replace("\\", r"\\").replace('"', r"\"") + '"'
----------------
ldionne wrote:

Yes, I think I'd prefer that. I'd rather not introduce complexity if it's not required.

https://github.com/llvm/llvm-project/pull/127662


More information about the libcxx-commits mailing list