[libcxx-commits] [libcxx] [libc++] Test existence of generated headers in the modulemap (PR #209312)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 4 06:01:06 PDT 2026
================
@@ -1694,16 +1694,21 @@ set(files
configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" @ONLY)
configure_file("${LIBCXX_ASSERTION_HANDLER_FILE}" "${LIBCXX_GENERATED_INCLUDE_DIR}/__assertion_handler" COPYONLY)
-# We generate the modulemap file so that we can include __config_site in it. For now, we don't know how to
-# make __config_site modular when per-target runtime directories are used.
-if (NOT LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+# We generate the modulemap file so that we can include __config_site in it. When using a target-specific include
+# directory, give it its own modulemap.
+if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
----------------
ldionne wrote:
No deep technical reason AFAICT. I agree it would be nice to be consistent on all platforms.
The main dependency here is that we'd have to change the Clang driver on Darwin (and on other platforms potentially) to search the per-target include dir. We'd also have to make sure that the driver searches for the correct target name (I think there are canonicalization issues where e.g. `arm64-apple-darwinX.Y.Z` is used interchangeably with `arm64-apple-macosX.Y.Z`).
But assuming the driver looks into the right paths on all platforms, we could move to always using the per-target runtime dir, and I agree it would simplify the model.
https://github.com/llvm/llvm-project/pull/209312
More information about the libcxx-commits
mailing list