Skip to content

Commit 460406a

Browse files
authored
[libc++] Exclude C++03 frozen headers from the modulemap (#113572)
This is a temporary patch, eventually these headers should be included in the modulemap as well.
1 parent a21573b commit 460406a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libcxx/utils/libcxx/header_information.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ def has_cxx20_module(self) -> bool:
9595
removed_in_20 = ["ccomplex", "ciso646", "cstdbool", "ctgmath"]
9696
return self.is_public() and not self.is_experimental() and not self.is_C_compatibility() and not self._name in removed_in_20
9797

98+
def is_cxx03_frozen_header(self) -> bool:
99+
"""Returns whether the header is a frozen C++03 support header."""
100+
return self._name.startswith("__cxx03/")
101+
98102
def is_in_modulemap(self) -> bool:
99103
"""Returns whether a header should be listed in the modulemap."""
100104
# TODO: Should `__config_site` be in the modulemap?
@@ -118,6 +122,11 @@ def is_in_modulemap(self) -> bool:
118122
# burden ourself with maintaining them in any way.
119123
if self._name.startswith("ext/"):
120124
return False
125+
126+
# TODO: Frozen C++03 headers should probably be in the modulemap as well
127+
if self.is_cxx03_frozen_header():
128+
return False
129+
121130
return True
122131

123132
def __str__(self) -> str:

0 commit comments

Comments
 (0)