Trying to Build clang with <iostream> or <raw_ostream>

Hey, i’m trying to integrate a function into clang compiler-rt’s thread sanitizer that writes the events to a file at runtime for possible offline analysis.
I had a lot of trouble building clang initially but got it working now.
But at this point I’m just lost. I’m unable to inject an output stream library Every time I try I get errors like:
llvm-project/llvm/include/llvm/Support/type_traits.h:17:10: fatal error: type_traits: file not found.
The build doesn’t seem to find the standard library, or am I missing something?
Anyone got an idea how to fix this.

I’m using LInux Ubunut x86-64
Thanks in advance.