[libcxx-commits] [PATCH] D144994: [Draft][libc++][modules] Adds std module.

Ben Boeckel via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 14 12:19:56 PDT 2023


ben.boeckel added inline comments.


================
Comment at: libcxx/docs/Modules.rst:162-164
+The libraries and/or executables that use the ``std`` module need to link
+against the ``std`` library. This is needed for CMake to get the proper module
+dependencies.
----------------
Mordante wrote:
> ben.boeckel wrote:
> > Is this intended to be a stable interface? IMO, support for std modules needs to come from CMake because this is going to be different for every compiler otherwise.
> I agree this is not the way users should use it. But without build system support this is how it works now.
> So I feel this is "good enough" for early adapters. However when we (libc++) know how we want to distribute it
> we should reach out to build system vendors and ask them to add proper support in their tools.
> 
> I'm not even sure what direction we want to take. For the experimental library we have a Clang flag which
> automatically link that library. Do we want to do something similar here or leave it entirely in the hands
> of the build system?
I think that some build-system agnostic data (similar to the MSVC STL JSON file linked to on Discourse is best). I don't think every compiler trying to chase umpteen build tool integrations (as compilers tend to be *far* harder to upgrade in the Real World than build system tools IME).

ISO C++'s SG15 is the best place for communication IMO.


================
Comment at: libcxx/stdmodules/CMakeLists.txt.in:9
+
+set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "2182bf5c-ef0d-489a-91da-49dbc3090d2a")
+set(CMake_TEST_CXXModules_UUID "a246741c-d067-4019-a8fb-3d16b0c9d1d3")
----------------
Mordante wrote:
> ben.boeckel wrote:
> > This UUID changes…regularly. There will probably need to be a table to do this "properly".
> Is there a public available table for these UUIDs? The last time I needed the one for CMake 3.25 I looked in the CMake git history.
The UUID is only documented in the CMake repository's `Help/dev/experimental.rst` file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144994/new/

https://reviews.llvm.org/D144994



More information about the libcxx-commits mailing list