Skip to content
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

Support P1689 dependency format #51792

Closed
mathstuf opened this issue Nov 9, 2021 · 4 comments
Closed

Support P1689 dependency format #51792

mathstuf opened this issue Nov 9, 2021 · 4 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla c++20 clang:modules C++20 modules and Clang Header Modules clang:tooling LibTooling

Comments

@mathstuf
Copy link
Contributor

mathstuf commented Nov 9, 2021

Bugzilla Link 52450
Version unspecified
OS All
CC @zygoloid

Extended Description

Clang should support the P1689 dependency format for modules:

https://wg21.link/p1689

I have a patch to GCC (https://github.com/mathstuf/cxx-modules-sandbox/blob/docker/trtbd.diff) to submit that uses the following command line flags:

-fdep-format= The format to write dependency information out in. Currently, it uses trtbd which stands for "TR to be determined", but bikeshedding needs to commence at some point I suppose. Ideas: p1689, tr2222 (the SG15 TR reserved number).

-fdep-output= is the name of the primary output for the future compilation (the -o the real compile will see). This is analogous to -MT.

-fdep-file= is the file to write the information to.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@krayfaus
Copy link

krayfaus commented Apr 6, 2022

Any update on this?

Sorry to bump, but I've searched and couldn't find anything other than this issue regarding the support of P1689 on Clang.

@mathstuf
Copy link
Contributor Author

mathstuf commented Apr 6, 2022

I've started plumbing the flags through and have them mostly working locally (the plumbing is laid down but there are clogs/hookups that need dealt with yet). However, there needs to be a new mode added to make the dependency mechanisms get the information necessary to where it can be output (that is, abusing -E is not suitable). That requires more LLVM/Clang knowledge than I have right now.

FWIW, GCC is in the same boat for any header imports but name-only modules at least work there (with my patch).

@ChuanqiXu9
Copy link
Member

May I ask if there is any update? Or if there is anything that other developers could help?

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 10, 2023

@llvm/issue-subscribers-clang-modules

@EugeneZelenko EugeneZelenko added the clang:tooling LibTooling label Feb 10, 2023
CarlosAlbertoEnciso pushed a commit to SNSystems/llvm-debuginfo-analyzer that referenced this issue Feb 10, 2023
… Named Modules in P1689 format (2/4)

Close llvm/llvm-project#51792
Close llvm/llvm-project#56770

This patch adds ClangScanDeps support for C++20 Named Modules in P1689
format. We can find the P1689 format at:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html.
After we land the patch, we're able to compile C++20 Named
Modules with CMake! And although P1689 is written by kitware people,
other build systems should be able to use the format to compile C++20
Named Modules too.

TODO: Support header units in P1689 Format.
TODO2: Support C++20 Modules in the full dependency format of
ClangScanDeps. We also want to support C++20 Modules and clang modules
together according to
https://discourse.llvm.org/t/how-should-we-support-dependency-scanner-for-c-20-modules/66027.
But P1689 format cares about C++20 Modules only for now. So let's focus
on C++ Modules and P1689 format. And look at the full dependency format
later.

I'll add the ReleaseNotes and Documentations after the patch get landed.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D137527
llvmbot pushed a commit to llvm/llvm-project-release-prs that referenced this issue Feb 10, 2023
… Named Modules in P1689 format (2/4)

Close llvm/llvm-project#51792
Close llvm/llvm-project#56770

This patch adds ClangScanDeps support for C++20 Named Modules in P1689
format. We can find the P1689 format at:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html.
After we land the patch, we're able to compile C++20 Named
Modules with CMake! And although P1689 is written by kitware people,
other build systems should be able to use the format to compile C++20
Named Modules too.

TODO: Support header units in P1689 Format.
TODO2: Support C++20 Modules in the full dependency format of
ClangScanDeps. We also want to support C++20 Modules and clang modules
together according to
https://discourse.llvm.org/t/how-should-we-support-dependency-scanner-for-c-20-modules/66027.
But P1689 format cares about C++20 Modules only for now. So let's focus
on C++ Modules and P1689 format. And look at the full dependency format
later.

I'll add the ReleaseNotes and Documentations after the patch get landed.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D137527
ChuanqiXu9 added a commit that referenced this issue Feb 13, 2023
…for C++20 Named Modules in P1689 format (2/4)

Close #51792
Close #56770

This patch adds ClangScanDeps support for C++20 Named Modules in P1689
format. We can find the P1689 format at:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html.
After we land the patch, we're able to compile C++20 Named
Modules with CMake! And although P1689 is written by kitware people,
other build systems should be able to use the format to compile C++20
Named Modules too.

TODO: Support header units in P1689 Format.
TODO2: Support C++20 Modules in the full dependency format of
ClangScanDeps. We also want to support C++20 Modules and clang modules
together according to
https://discourse.llvm.org/t/how-should-we-support-dependency-scanner-for-c-20-modules/66027.
But P1689 format cares about C++20 Modules only for now. So let's focus
on C++ Modules and P1689 format. And look at the full dependency format
later.

I'll add the ReleaseNotes and Documentations after the patch get landed.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D137527
ChuanqiXu9 added a commit to ChuanqiXu9/llvm-project that referenced this issue Feb 13, 2023
… Named Modules in P1689 format (2/4)

Close llvm#51792
Close llvm#56770

This patch adds ClangScanDeps support for C++20 Named Modules in P1689
format. We can find the P1689 format at:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html.
After we land the patch, we're able to compile C++20 Named
Modules with CMake! And although P1689 is written by kitware people,
other build systems should be able to use the format to compile C++20
Named Modules too.

TODO: Support header units in P1689 Format.
TODO2: Support C++20 Modules in the full dependency format of
ClangScanDeps. We also want to support C++20 Modules and clang modules
together according to
https://discourse.llvm.org/t/how-should-we-support-dependency-scanner-for-c-20-modules/66027.
But P1689 format cares about C++20 Modules only for now. So let's focus
on C++ Modules and P1689 format. And look at the full dependency format
later.

I'll add the ReleaseNotes and Documentations after the patch get landed.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D137527
CarlosAlbertoEnciso pushed a commit to SNSystems/llvm-debuginfo-analyzer that referenced this issue Feb 13, 2023
…for C++20 Named Modules in P1689 format (2/4)

Close llvm/llvm-project#51792
Close llvm/llvm-project#56770

This patch adds ClangScanDeps support for C++20 Named Modules in P1689
format. We can find the P1689 format at:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html.
After we land the patch, we're able to compile C++20 Named
Modules with CMake! And although P1689 is written by kitware people,
other build systems should be able to use the format to compile C++20
Named Modules too.

TODO: Support header units in P1689 Format.
TODO2: Support C++20 Modules in the full dependency format of
ClangScanDeps. We also want to support C++20 Modules and clang modules
together according to
https://discourse.llvm.org/t/how-should-we-support-dependency-scanner-for-c-20-modules/66027.
But P1689 format cares about C++20 Modules only for now. So let's focus
on C++ Modules and P1689 format. And look at the full dependency format
later.

I'll add the ReleaseNotes and Documentations after the patch get landed.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D137527
tru pushed a commit to llvm/llvm-project-release-prs that referenced this issue Feb 13, 2023
… Named Modules in P1689 format (2/4)

Close llvm/llvm-project#51792
Close llvm/llvm-project#56770

This patch adds ClangScanDeps support for C++20 Named Modules in P1689
format. We can find the P1689 format at:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1689r5.html.
After we land the patch, we're able to compile C++20 Named
Modules with CMake! And although P1689 is written by kitware people,
other build systems should be able to use the format to compile C++20
Named Modules too.

TODO: Support header units in P1689 Format.
TODO2: Support C++20 Modules in the full dependency format of
ClangScanDeps. We also want to support C++20 Modules and clang modules
together according to
https://discourse.llvm.org/t/how-should-we-support-dependency-scanner-for-c-20-modules/66027.
But P1689 format cares about C++20 Modules only for now. So let's focus
on C++ Modules and P1689 format. And look at the full dependency format
later.

I'll add the ReleaseNotes and Documentations after the patch get landed.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D137527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++20 clang:modules C++20 modules and Clang Header Modules clang:tooling LibTooling
Projects
Status: Done
Development

No branches or pull requests

5 participants