[CMake][ASan][HWASan] Set an explicit dependency on libc++ headers

We have seen failing builds due to a race condition between
RTAsan_dynamic and libc++ headers builds, specifically libc++
headers depend on __config and if this header hasn't been copied
into the final location, including other headers will typically
result in failure. To avoid this race, we add an explicit dependency
on libc++ headers which ensures that they've been copied into place
before the sanitizer object library build starts.

Differential Revision: https://reviews.llvm.org/D54198

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@346339 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed