-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
use typed_kwargs for vs_module_defs #12051
use typed_kwargs for vs_module_defs #12051
Conversation
5b6c5c3
to
3b13d10
Compare
3b13d10
to
2d5db86
Compare
Rebased on @eli-schwartz's work, tests added, docs added. Should be ready for review now |
2d5db86
to
86af405
Compare
cee3f99
to
c895eb2
Compare
c895eb2
to
6a284fc
Compare
defs = custom_target('generate_module_defs', ...) | ||
shared_library('lib1', vs_module_defs : defs[0]) | ||
shared_library('lib2', vs_module_defs : defs[2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any actual use cases for this by the way? Because it was only ever discovered by a fuzzer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from that it's strange to take CustomTarget but not CustomTargetIndex, it's likely niche that there's a real reason for it. The most realistic one I can think of is that you're generating code and the vs_module_defs together from a representative source of some kind, but you want to use a module defs file instead of the pre-processor:
ct = custom_target(
'from_xml',
input : 'functions.xml',
output : ['functions.hpp', 'functions.cpp', 'functions.def'],
command : ['xml-to-code', '@INPUT@', '@OUTPUT@'],
)
both_library(
'generated',
ct[0], ct[1],
vs_module_defs : ct[2],
)
6a284fc
to
17276d9
Compare
17276d9
to
5a5fb9f
Compare
5a5fb9f
to
27fe7b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. @eli-schwartz did you have anything else to add?
Because `CustomTargetIndex`es don't have a `subdir` property, but they do implement the `get_subdir()` method
27fe7b3
to
e9ca4b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I suggested above, I don't find the second commit compellingly useful. On the other hand, I also don't see a reason to specifically go ahead and reject it, so...
lgtm
@tristan957 had mentioned this was needed for Executables as well, but I haven't written a test case or doc changes for that yet.