Skip to content

[libc++] Exclude C++03 frozen headers from the modulemap #113572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libcxx/utils/libcxx/header_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def has_cxx20_module(self) -> bool:
removed_in_20 = ["ccomplex", "ciso646", "cstdbool", "ctgmath"]
return self.is_public() and not self.is_experimental() and not self.is_C_compatibility() and not self._name in removed_in_20

def is_cxx03_frozen_header(self) -> bool:
"""Returns whether the header is a frozen C++03 support header."""
return self._name.startswith("__cxx03/")

def is_in_modulemap(self) -> bool:
"""Returns whether a header should be listed in the modulemap."""
# TODO: Should `__config_site` be in the modulemap?
Expand All @@ -118,6 +122,11 @@ def is_in_modulemap(self) -> bool:
# burden ourself with maintaining them in any way.
if self._name.startswith("ext/"):
return False

# TODO: Frozen C++03 headers should probably be in the modulemap as well
if self.is_cxx03_frozen_header():
return False

return True

def __str__(self) -> str:
Expand Down
Loading