Currently, libc++ itself cannot be built with its own modulemap file.
This patch fixes includes in the implementation source files as follows:
- Replace includes of private headers with their public counterparts.
- Fix several missing imports.
- Move __std_stream out of the modulemap and into a header file in src/include as it's only used in iostream.cpp
Note that this patch isn't sufficient to allow compiling libc++ with
it's own modulemap - right now, clang still complains that iostream.cpp
is redefining several symbols in the iostream header with different
types.
I don't think we want to do this. In fact, we should go the other way and use private headers instead IMO. Instead, we should pass -fmodule-name=std to let clang know that these files implement the module.