[libcxx-commits] [PATCH] D144994: [Draft][libc++][modules] Adds std module.
H. Vetinari via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 12 18:37:41 PDT 2023
h-vetinari added subscribers: mgorny, ben.boeckel.
h-vetinari added inline comments.
================
Comment at: libcxx/docs/Modules.rst:65
+ to discuss that approach before spending effort in it.
+ * Currently the ``cppm`` file and the generated ``CMakeLists.txt`` are not
+ installed. Before doing that it would be good to determine what the best
----------------
Mordante wrote:
> aaronmondal wrote:
> > We intend to distribute all `.cppm` files, i.e. the partitions as well, right?
> Yes I want to distribute them, in fact we must distribute them else users can't use modules.
>
> But we need to find the "proper" location to store them. Since this is something new this probably needs some involvement of our packagers. I don't expect the Linux Standard Base has an entry for C++20 modules.
> But we need to find the "proper" location to store them. Since this is something new this probably needs some involvement of our packagers. I don't expect the Linux Standard Base has an entry for C++20 modules.
As mentioned already, I think there are strong parallels with distributing headers. The bare minimum should be that they are automatically discoverable by the toolchain that produced them (should be somewhere under INSTALL_PREFIX obviously), but ideally it's in a standard location that's uniform across toolchains (again, relative to a PREFIX), like the headers and libs are too. I'm not sure if SG21 has had discussions about this, or if CMake has already thought about this.
Personally, I think the best might be a separate folder like `$PREFIX/something_module_related/foo.cppm`, but I wouldn't care much or at all if it's under `$PREFIX/include/something_module_related/foo.cppm` or `$PREFIX/lib/<libname>/foo.cppm`, etc., as long as it's discoverable and works.
CC @mgorny as another packager & @ben.boeckel for the CMake side.
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