@@ -128,6 +128,28 @@ enable or disable extended libc++ behavior.
128
128
replacement scenarios from working, e.g. replacing `operator new ` and
129
129
expecting a non-replaced `operator new[] ` to call the replaced `operator new `.
130
130
131
+ **_LIBCPP_REMOVE_TRANSITIVE_INCLUDES **:
132
+ When this macro is defined, the standard library headers will adhere to a
133
+ stricter policy regarding the (transitive) inclusion of other standard library
134
+ headers, only guaranteeing to provide those definitions explicitly mandated by
135
+ the standard. Please notice that defining this macro might break existing codebases
136
+ that implicitly rely on standard headers providing definitions not explicitly
137
+ required by the standard.
138
+
139
+ The primary motivation for this configuration macro is to improve compilation
140
+ times. In most standard library implementations, header files include more
141
+ definitions than officially required because the implementation details give rise
142
+ to internal dependencies. The common practice is to have the standard headers
143
+ internally include other standard headers, but this generally results in
144
+ increased compilation overhead. This configuration option attempts to mitigate
145
+ this problem by avoiding such unnecessary inclusions. Compiling
146
+ a codebase with this macro may improve portability by identifying
147
+ missing standard header inclusions.
148
+
149
+ However, be aware that enabling this macro may lead to breakages
150
+ when updating to a newer version of the library, since transitive includes
151
+ that your code was previously relying on may have been removed.
152
+
131
153
**_LIBCPP_DISABLE_DEPRECATION_WARNINGS **:
132
154
This macro disables warnings when using deprecated components. For example,
133
155
using `std::auto_ptr ` when compiling in C++11 mode will normally trigger a
0 commit comments