Skip to content

[libc++] Don't generate the modulemap file #80352

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 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion libcxx/docs/Contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ sure you don't forget anything:
- Did you add all new named declarations to the ``std`` module?
- If you added a header:

- Did you add it to ``include/module.modulemap.in``?
- Did you add it to ``include/module.modulemap``?
- Did you add it to ``include/CMakeLists.txt``?
- If it's a public header, did you update ``utils/libcxx/header_information.py``?

Expand Down
9 changes: 1 addition & 8 deletions libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@ set(files
mdspan
memory
memory_resource
module.modulemap
mutex
new
numbers
Expand Down Expand Up @@ -1021,18 +1022,10 @@ set(files
wctype.h
)

foreach(feature LIBCXX_ENABLE_FILESYSTEM LIBCXX_ENABLE_LOCALIZATION LIBCXX_ENABLE_THREADS LIBCXX_ENABLE_WIDE_CHARACTERS)
if (NOT ${${feature}})
set(requires_${feature} "requires LIBCXX_CONFIGURED_WITHOUT_SUPPORT_FOR_THIS_HEADER")
endif()
endforeach()

configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" @ONLY)
configure_file("module.modulemap.in" "${LIBCXX_GENERATED_INCLUDE_DIR}/module.modulemap" @ONLY)
configure_file("${LIBCXX_ASSERTION_HANDLER_FILE}" "${LIBCXX_GENERATED_INCLUDE_DIR}/__assertion_handler" COPYONLY)

set(_all_includes "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site"
"${LIBCXX_GENERATED_INCLUDE_DIR}/module.modulemap"
"${LIBCXX_GENERATED_INCLUDE_DIR}/__assertion_handler")
foreach(f ${files})
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion libcxx/test/libcxx/lint/lint_headers.sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def exclude_from_consideration(path):
return (
path.endswith(".txt")
or path.endswith(".modulemap.in")
or path.endswith(".modulemap")
or os.path.basename(path) == "__config"
or os.path.basename(path) == "__config_site.in"
or os.path.basename(path) == "libcxx.imp"
Expand Down
1 change: 0 additions & 1 deletion libcxx/utils/libcxx/header_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
def is_header(file):
"""Returns whether the given file is a header (i.e. not a directory or the modulemap file)."""
return not file.is_dir() and not file.name in [
"module.modulemap.in",
"module.modulemap",
"CMakeLists.txt",
"libcxx.imp",
Expand Down