There are multiple driver issues preventing users to use modules on Mac M1, Ubuntu and Windows:
These problems are environment dependent. I can’t do a lot since I don’t have these environment and I don’t like to develop without testing but only reading documents and by chats.
I feel these problems are more or less easy problems but they prevents important use for modules (import std; and clang-cl with modules). It will be pretty good if someone can take it.
Thank you for posting about this! Hopefully we can get a bit more assistance from the community because these environment-specific bugs definitely impact our users, but are really hard to work on when you don’t have access to the environment yourself.
Tagging some folks who may be able to find some help for us:
I’d be very happy to contribute, but I might need help with a few things. I have a Windows setup, and am trying to familiarise myself with the codebase.
I’m happy to help review the changes for Windows modules support, but unfortunately, I don’t have the time to help with implement it currently. Also, since this is focused on libc++ specifically, I assume that this is the clang style modules and not trying to be fully compatible with Microsoft’s modules right?
I just gave it a test. -print-file-name=libstdc++.modules.json works as expceted in my environment. -print-library-module-manifest-path doesn’t work well. But it looks like a simple issue. I’ll try to fix it.
CMake only knows to search for libc++ modules with clang
Did you (or anyone else) try to use clang (clang-cl) to find the modules json file for std module in MSSTL? Does it work? If no, could you please try to file an issue and post it here. So that volunteers on windows can solve that.
Cool, thanks. I’ll have to cook up a test for CMake with this.
Not to my knowledge. But it can be investigated once clang-cl support is available at all (currently scanning is broken due to usage of -Fo rather than -o). That is being addressed in this PR.
I’m looking for testers and a bit of help with my PR to get /Fo in clang-cl working with -fmodule-output—there’s one failing lit test and I’d like to get to the bottom of it.