Skip to content
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

Compress embedded GDExtension interface #77137

Merged

Conversation

RedworkDE
Copy link
Member

@RedworkDE RedworkDE commented May 16, 2023

Stops older MSCV compiler versions from failing to build because of the huge string literal and saves about 60kb in the final executable.

Code largely follows that same patterns as make_doc_header and make_certs_header.

@RedworkDE RedworkDE requested a review from a team as a code owner May 16, 2023 20:13
@YuriSizov
Copy link
Contributor

YuriSizov commented May 16, 2023

So, what prompted this PR is that I reported that I can no longer build master after #76406. I use MSVC 14.2 (builds tools from Visual Studio 2019), and I encountered this issue:

core/extension/gdextension_interface_dump.gen.h(1589): fatal error C1091: compiler limit: string exceeds 65535 bytes in length

I can confirm that with this patch applied my builds can continue past the point of previous error. But I think someone more competent in the area should review and approve the PR, if this is the correct fix.

@dsnopek
Copy link
Contributor

dsnopek commented May 16, 2023

I built and tested godot --dump-gdextension-interface with this PR, and it worked as expected! So, from a GDExtension perspective, this looks good.

Comparing the new code with make_doc_header() in the buildsystem and DocTools::load_compressed() in the engine, it does really look the same.

Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

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

Approving it then, tentatively :)

@akien-mga akien-mga merged commit c97ead9 into godotengine:master May 17, 2023
@RedworkDE RedworkDE deleted the gdextension-interface-compress branch May 17, 2023 09:27
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants