[libcxx-commits] [libcxx] [libc++][utils] Fix LIT `%if` substitution support (PR #209358)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 14 05:10:55 PDT 2026


================
@@ -0,0 +1,11 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Make sure that LIT `%if` substitutions are aware of the available features.
+
+// RUN: not %if libcpp-abi-version={{[0-9]+}} %{ not %} echo "hello world"
----------------
ldionne wrote:

Let's use a Lit feature that is always available, even when we're not testing libc++ (e.g. when we're testing MSVC STL). We could do e.g. `RUN: not %if target={{.+}} %{ not %} echo "hello world"` since the target feature should always be set.

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


More information about the libcxx-commits mailing list