Skip to content

Conversation

pjreiniger
Copy link
Contributor

This should simplify the creation and maintenance of halsim libraries. The macro has been updated to build all of the different flavors that have been set up and greatly reduces the duplication.

@pjreiniger pjreiniger requested review from a team as code owners August 8, 2025 02:52
@pjreiniger pjreiniger requested a review from AustinSchuh August 8, 2025 02:52
@github-actions github-actions bot added the 2027 2027 target label Aug 8, 2025
)

wpilib_cc_static_library(
name = "static/{}".format(name),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even after reading the docstring I'm confused what the difference between :static/foo and :foo_static are meant to be, given they have the same visibility.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming can probably be improved. The idea is as follows:

When you build a static extension, nothing special needs to happen. When you are building a dynamic halsim extension, you need "-DHALSIM_InitExtension=" + static_init_extension_name, to define some special symbols to help load the shared library. To do that, you need to build the code twice, once without the define, another time with.

I bet we could mark the _static version as private.

@AustinSchuh
Copy link
Contributor

Once @auscompgeek 's comment is addressed, I'm happy with this and happy to approve.

@pjreiniger
Copy link
Contributor Author

Once @auscompgeek 's comment is addressed, I'm happy with this and happy to approve.

Actually @AustinSchuh could you provide more info there? You are the one who added those static versions if you could give the comment more color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2027 2027 target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants