Conversation
This change adds optional generation of a self-contained C++20 header for AOT-compiled function entrypoints. The generated header describes the packed ABI using standard C++ types and constants derived from the AOT entrypoint metadata. It also provides a C++ declaration for the generated packed function, allowing the AOT object to be consumed without parsing AotPackageEntrypointsProto at runtime or manually reproducing ABI details in the caller. The header generation is exposed through a new aot_compiler_main option and is intended to complement the existing object and proto/textproto outputs. Fixes google#4823
Contributor
|
See comment in #4823. This is not a feature we need. For functions the wrapper already provides access to the bit-packed entry points in a way that abstracts the internal details of how exactly our compiler works with essentially no overhead. Furthermore, we absolutely should not be doing text templating like this in C++. We generally use python an Jinja to handle c++ code generation for things like this. |
Contributor
Author
|
Closing this for now while I take a closer look at the existing JIT wrapper mechanism discussed in #4823. Thanks for pointing me in the right direction. If I find that my use case still requires something not covered by the current mechanism, I'll come back with a more focused proposal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds optional generation of a self-contained C++20 header for AOT-compiled function entrypoints.
The generated header describes the packed ABI using standard C++ types and constants derived from the AOT entrypoint metadata. It also provides a C++ declaration for the generated packed function, allowing the AOT object to be consumed without parsing AotPackageEntrypointsProto at runtime or manually reproducing ABI details in the caller.
The header generation is exposed through a new aot_compiler_main option and is intended to complement the existing object and proto/textproto outputs.
Fixes #4823