Skip to content
Commit 0ea3d88b authored by Ian Anderson's avatar Ian Anderson
Browse files

[Modules] Add a flag to control builtin headers being in system modules

Including select builtin headers in system modules is a workaround for module cycles, primarily in Apple's Darwin module that includes all of its C standard library headers. The workaround is problematic because it doesn't include all of the builtin headers (inttypes.h is notably absent), and it also doesn't include C++ headers. The straightforward for for this is to make top level modules for all of the C standard library headers and unwind.h in C++, clang, and the OS.

However, doing so in clang before the OS modules are ready re-introduces the module cycles. Add a -fbuiltin-headers-in-system-modules option to control if the special builtin headers belong to system modules or builtin modules. Pass the option by default for Apple.

Reviewed By: ChuanqiXu, Bigcheese, benlangmuir

Differential Revision: https://reviews.llvm.org/D159483
parent 6b03d8aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment