aboutsummaryrefslogtreecommitdiff
path: root/cmake/CMakeLists.txt
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2018-04-26 16:31:26 +0100
committerJon Skeet <skeet@pobox.com>2018-04-27 16:47:46 +0100
commit1b219a174c413af3b18a082a4295ce47932314c4 (patch)
treeb9ce5722b2b02b6dbd4fc3e0221495baa7a30742 /cmake/CMakeLists.txt
parenta21f225824e994ebd35e8447382ea4e0cd165b3c (diff)
downloadprotobuf-1b219a174c413af3b18a082a4295ce47932314c4.tar.gz
protobuf-1b219a174c413af3b18a082a4295ce47932314c4.tar.bz2
protobuf-1b219a174c413af3b18a082a4295ce47932314c4.zip
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.
Diffstat (limited to 'cmake/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions