[lldb] Correctly add runtime test dependencies
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 31 Aug 2022 23:33:54 +0000 (16:33 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 31 Aug 2022 23:37:35 +0000 (16:37 -0700)
commitc7511b4ecf45c174c43d9177b843f15e2f3bd68b
tree22e1c5bb71b10aa1b1deadcf2e1c874ec5a17b1c
parent5b0863f3ef9ed967794a6a135e60ea72ef6304cf
[lldb] Correctly add runtime test dependencies

When a runtime is enabled through LLVM_ENABLE_RUNTIMES, it is loaded
after other projects (i.e. after LLDB). This means that the
corresponding targets don't exist when LLDB is configured. To support
runtimes being enable this way, we need to check if they're listed in
LLVM_ENABLE_RUNTIMES. For runtimes being enabled as projects (i.e.
through LLVM_ENABLE_RUNTIMES) we need to check for the target.

This patch unifies things and correctly adds compiler-rt and libcxx as
test dependencies in both scenarios.
lldb/test/CMakeLists.txt