Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Compiler option sets for Native targets #6665
Native targets do not have support for compiler option sets.
Add support for compiler options sets for use in native compile tasks.
Users can specify option set defaults and their corresponding default enabled values in Pants.ini. Native targets support option sets.
@CMLivingston talked about this offline... I had initially suggested that it would be easier to add
@cosmicexplorer : If you agree that it is worthwhile to do
Took a first pass at option sets. @cosmicexplorer I tried to capture what you were talking about as using a mixin for shared default option set keys. Please let me know if this is at all related to what you were describing. More testing to come after I get the green light. Thanks!
There are a few things to think about, and I'm not sure I can recommend the appropriate thing here, but I know that @cosmicexplorer can:
Using a Subsystem always means creating a new "namespace". If you scope the subsystem (
If you use inheritance, then you're just adding the options directly to some existing (
This is very close, but there is one big open question. Thanks!
I would really like the implementation of
compiler_option_sets to be shared with the JVM implementation for this to be merged, ideally as a mixin (something similar to e.g.
MirroredTargetOptionMixin). Even getting the hang of understanding how to use
compiler_option_sets has been described as difficult to me from users consuming the JVM version, and I really don't want to introduce further idiosyncracies.
The reason why I want this is because we'll never have to make any subsystems just to add a compiler option ever again, and because then every other subsystem will have a deep knowledge of which settings to apply in which scenarios, which could potentially make it extremely easy to then implement reliable and granular caching of native artifacts in a way, yet again, that no other build tool can do.