-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
[Bindings] Build profile now strips methods and skip files #1680
Conversation
fec7bfe
to
ebf9829
Compare
I've further extracted the functions related to build profiles into a dedicated tool ( |
81ee264
to
37487dc
Compare
@Faless Between this PR and #1675, which is your preference? The experience for users of scons is the same, and it sounds (from the discussion on the other PR) like either approach is fine for CMake as well. I'm personally fine with either, although, I guess this PR has some theoretical advantages, like other language bindings could use it, or if maybe there start being other tools that interact with |
I wasn't really convinced by this approach at first, but after a couple of iteration I think it's now better than the other, and indeed it should be usable as a standalone tool by other bindings. I'll close the other PR. |
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 really great to me!
In the past, we've discussed that adding the ability to exclude methods would be impractical because you'd need to list all the methods, but this approach is a very nice compromise.
I tested with the test project here, and the godot_openxr_vendors extension, and the debug binaries were about ~200k and ~400k smaller, respectively.
Other than the one issue I noted with 'godot_openxr_vendors' below, it seemed to work great! I skimmed the code, and that's looking good too
37487dc
to
5ea86b4
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.
Thanks! LGMT :-)
This allows removing dependencies that are not explicitly unused by the gdextension being built and is implemented using an intermediate json API file with the methods and classes stripped (i.e. without touching the file generators).
825c2dd
to
0cfe01e
Compare
This allows removing dependencies that are not explicitly unused by the gdextension being built and is implemented using an intermediate json API file with the methods and classes stripped (i.e. without touching the file generators).
Alternative to #1675