[libc++] Persistently cache memoized operations during Lit configuration
authorLouis Dionne <ldionne.2@gmail.com>
Tue, 9 Nov 2021 14:08:08 +0000 (09:08 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Tue, 18 Jan 2022 15:44:23 +0000 (10:44 -0500)
commit4afa9c17262cbca3f85352c8d3f352639f83e0b3
treef64d7edae71fecb291efd2e697abca3c4092e57c
parentce2345d8c14b2c8b9a420b8ca53dc1ea5d43dc6a
[libc++] Persistently cache memoized operations during Lit configuration

When invoking Lit repeatedly, we perform all the configuration checks
over and over again, which takes a lot of time. This patch allows caching
the result of configuration checks persistently across Lit invocations to
speed this up.

In theory, this should still be functionally correct since the cache
key should contain everything that determines the output of the
configuration check. However, in cases where e.g. the compiler has
changed but is at the same path as previously, the Lit configuration
checks will be cached even though technically the cache should have
been invalidated.

Differential Revision: https://reviews.llvm.org/D117361
libcxx/utils/libcxx/test/dsl.py