-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[cxx-interop] Move included stdlib headers from libstdcxx.h to the modulemap #60722
Conversation
|
@swift-ci please smoke test |
03e84bb
to
417dcc0
Compare
|
@swift-ci please smoke test |
|
This looks incorrect - Why do you want to do this only for those two headers? Shouldn't all the headers referenced in libstdcxx.h be in the module map? |
|
You can also try making libstdcxx.h an umbrella header, since VFS places it into the libstdcxx directory. |
|
Yeap, you're right, we should try to refer to the stdlib headers in a consistent way. I moved these two headers only for now to make sure this doesn't cause too much fallout – moving all headers into the modulemap at once could produce a lot of compiler errors which would be hard to investigate. I tried making |
|
Ok, in that case the header map should be generated dynamically in the compiler, and all the headers should be referenced in the module map to avoid issues like this. I don't see how this could cause additional fallout - at this point you're just playing whack a mole with the errors reported on the forums (there could be more), so wouldn't it make sense to address this correctly? |
|
A change like this could cause new modularization errors if, for example, there is a C++ stdlib header that is not directly referenced from the modulemap, but is
I agree, I'm going to move more headers to the modulemap before merging this. I wonder if it's possible to move the optional headers (those under |
…modulemap By referencing a C++ stdlib header directly from the modulemap, we make sure that the header is treated as a part of the stdlib, not a part of the first clang module to include it. Addresses the issue described in https://forums.swift.org/t/llvm-fails-to-build-with-modules/59700/8.
417dcc0
to
74723a9
Compare
|
@swift-ci please smoke test |
tuple from libstdc++ header to the modulemap|
I will move the rest of the headers (those that are under |
By referencing the C++ stdlib header directly from the modulemap, we make sure that the header is treated as a part of the stdlib, not a part of the first clang module to include it.
Addresses the issue described in https://forums.swift.org/t/llvm-fails-to-build-with-modules/59700/8.