[1/5] support C++20 Modules, add module_interfaces attr#22425
[1/5] support C++20 Modules, add module_interfaces attr#22425PikachuHyA wants to merge 27 commits intobazelbuild:masterfrom
Conversation
comius
left a comment
There was a problem hiding this comment.
Can you add tests in the same PR?
- verify the experimental flag works as expected
- verify cc_binary, cc_test and cc_library work with the new attribute (although do nothing yet)
- verify calling cc_common.compile works with the new parameter
hi @mathstuf, In current implementation, I'm using the With this feature, we can update our codebase bit by bit, turning on C++20 Modules for some code without having to scan every file. |
f512dae to
4cc08d9
Compare
That's probably fine given what I know of Bazel (that per-source behaviors are discouraged). |
|
hi @comius , thanks for your comments. Changes Summary
|
|
The code was approved by @trybka internally, suggesting to change the name from cpp20_modules to cpp_modules in the code, except in the documentation/some comments. I applied the changes, to move things along a bit faster. The PR will be merged now. |
Do I need to make this change in this patch? |
|
@PikachuHyA thank you so much for this work, I am looking forward to using C++20 modules in our bazel builds :-) |
I split the XXL PR #19940 into several small patches.
This is the first patch of Support C++20 Modules, I add
module_interfacesattr onlyexample
build failed with the following message
To build with C++20 Modules, the flag
--experimental_cpp20_modulesmust be added.To build with C++20 Modules, the feature
cpp20_modulesmust be enabled.the flag
--experimental_cpp20_modulesworks on global andthe feature
cpp20_moduleswork on each targetbut in this patch, do nothing with C++20 Module Interfaces.