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

Fix to allow AOT compilers to play nicely with reflection #4559

Merged
merged 1 commit into from Apr 27, 2018

Commits on Apr 26, 2018

  1. Fix to allow AOT compilers to play nicely with reflection

    With this fix, Unity using IL2CPP should work with one of two
    approaches:
    
    - Call `FileDescriptor.ForceReflectionInitialization<T>` for every
      enum present in generated code (including oneof case enums)
    - Ensure that IL2CPP uses the same code for int and any int-based
      enums
    
    The former approach is likely to be simpler, unless IL2CPP changes
    its default behavior. We *could* potentially generate the code
    automatically, but that makes me slightly uncomfortable in terms of
    generating code that's only relevant in one specific scenario. It
    would be reasonably easy to write a tool (separate from protoc) to
    generate the code required for any specific set of assemblies, so
    that Unity users can include it in their application. We can always
    decide to change to generate it automatically later.
    jskeet committed Apr 26, 2018
    Copy the full SHA
    b2639b2 View commit details
    Browse the repository at this point in the history