[libc++] Properly handle errors happening during Lit configuration
authorLouis Dionne <ldionne.2@gmail.com>
Tue, 16 Nov 2021 17:35:42 +0000 (12:35 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Fri, 26 Nov 2021 16:03:15 +0000 (11:03 -0500)
commitf18f9ce3665e51e5f09a3d32f9e36fd24e3a79f7
tree4c02ca2317e2610e67821ad109f24b31f52b3e01
parent7dc9a03cfd789e6a08ca96666e9fbb81431eb34f
[libc++] Properly handle errors happening during Lit configuration

Instead of silently swallowing errors that happen during Lit configuration
(for example trying to obtain compiler macros but compiling fails), raise
an exception with some amount of helpful information.

This should avoid the possibility of silently configuring Lit in a bogus
way, and also provides more helpful information when things fail.

Note that this requires a bit more finesse around how we handle some
failing configuration checks that we would previously return None for.

Differential Revision: https://reviews.llvm.org/D114010
libcxx/test/libcxx/selftest/dsl/dsl.sh.py
libcxx/utils/libcxx/test/dsl.py