[libcxx-commits] [libcxx] [libcxxabi] [libc++] Clean up and update deployment target features (PR #96312)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 28 13:21:50 PDT 2024


================
@@ -690,12 +686,12 @@ def check_gdb(cfg):
 # a libc++ flavor that enables availability markup. Similarly, a test could fail when
 # run against the system library of an older version of FreeBSD, even though FreeBSD
 # doesn't provide availability markup at the time of writing this.
-for version in ("11", "12", "13", "14", "15", "16", "17", "18", "19"):
+for version in ("9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"):
     DEFAULT_FEATURES.append(
         Feature(
             name="using-built-library-before-llvm-{}".format(version),
-            when=lambda cfg: BooleanExpression.evaluate(
-                "stdlib=system && _target-before-llvm-{}".format(version),
+            when=lambda cfg, v=version: BooleanExpression.evaluate(
+                "stdlib=system && !_target-has-llvm-{}".format(v),
----------------
ldionne wrote:

In Lit, a feature is either defined (in which case it is truthy) or it is not defined (falsy). We don’t define _target-has-llvm-18 since no released OS contains it, which seems reasonable. The rest kinda falls out of this.

I am also not a huge fan, ideally we would be able to compare versions in Lit so we could avoid the awkward definition of these _target features in the first place. But given the status quo, I don’t know how to do this differently.

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


More information about the libcxx-commits mailing list