[libcxx-commits] [libcxx] [libc++] Fixes lit portability issues. (PR #72435)

Stephan T. Lavavej via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 15 15:43:25 PST 2023


================
@@ -29,7 +29,13 @@ def appendToSubstitution(substitutions, key, value):
     return [(k, v + " " + value) if k == key else (k, v) for (k, v) in substitutions]
 
 
-std = getSubstitution("%{cxx_std}", config)
+# External users of the LLVM test suite might not have set the substitutions.
+std = ""
+try:
+    std = getSubstitution("%{cxx_std}", config)
+except:
+    pass
----------------
StephanTLavavej wrote:

I don't have the best understanding of how we interface with Lit (i.e. how to recognize the "normal entry point"), but it's the stuff in https://github.com/microsoft/STL/tree/46843b3bf320c6070ff63e978936bcf898e5a2bc/tests/utils . We invoke our `stl-lit.py` generated from https://github.com/microsoft/STL/blob/46843b3bf320c6070ff63e978936bcf898e5a2bc/tests/utils/stl-lit/stl-lit.in and that eventually uses our `params.py` at https://github.com/microsoft/STL/blob/46843b3bf320c6070ff63e978936bcf898e5a2bc/tests/utils/stl/test/params.py . If there's something we should add there or to another file, I would be happy to do so.

(I think the raw string regex changes in this PR are independently needed, though.)

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


More information about the libcxx-commits mailing list