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

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Feb 1, 2024

We actually didn't generate anything in that file, so generating it via CMake is useless.

@ldionne ldionne requested a review from a team as a code owner February 1, 2024 22:09
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 1, 2024
@ldionne
Copy link
Member Author

ldionne commented Feb 1, 2024

CC @nico This will require a manual adjustment to gn when it lands.

@llvmbot
Copy link
Member

llvmbot commented Feb 1, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

We actually didn't generate anything in that file, so generating it via CMake is useless.


Full diff: https://github.com/llvm/llvm-project/pull/80352.diff

4 Files Affected:

  • (modified) libcxx/docs/Contributing.rst (+1-1)
  • (modified) libcxx/include/CMakeLists.txt (-1)
  • (renamed) libcxx/include/module.modulemap ()
  • (modified) libcxx/utils/libcxx/header_information.py (-1)
diff --git a/libcxx/docs/Contributing.rst b/libcxx/docs/Contributing.rst
index 596d86ef22449..90aabc9c4ff6f 100644
--- a/libcxx/docs/Contributing.rst
+++ b/libcxx/docs/Contributing.rst
@@ -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``?
 
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 0bb23710cae84..a0bea5d19127e 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -1024,7 +1024,6 @@ foreach(feature LIBCXX_ENABLE_FILESYSTEM LIBCXX_ENABLE_LOCALIZATION LIBCXX_ENABL
 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"
diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap
similarity index 100%
rename from libcxx/include/module.modulemap.in
rename to libcxx/include/module.modulemap
diff --git a/libcxx/utils/libcxx/header_information.py b/libcxx/utils/libcxx/header_information.py
index b2aa3739ea697..bccae353b0c6b 100644
--- a/libcxx/utils/libcxx/header_information.py
+++ b/libcxx/utils/libcxx/header_information.py
@@ -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",

@ldionne ldionne force-pushed the review/dont-configure-modulemap branch 2 times, most recently from 4117dc8 to cc2789e Compare February 5, 2024 16:53
@ldionne ldionne force-pushed the review/dont-configure-modulemap branch from cc2789e to cbfc3ba Compare February 26, 2024 19:38
Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! LGTM!

ldionne added 2 commits March 4, 2024 18:15
We actually didn't generate anything in that file, so generating it
via CMake is useless.
@ldionne ldionne force-pushed the review/dont-configure-modulemap branch from a351f04 to e6beec7 Compare March 4, 2024 23:15
@ldionne ldionne merged commit 6fd27d5 into llvm:main Mar 4, 2024
@ldionne ldionne deleted the review/dont-configure-modulemap branch March 4, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants