• pliard@google.com's avatar
    Don't call AddDesc() at static init time in LITE_RUNTIME mode. · 6103d4ed
    pliard@google.com authored
    This patch makes the generation of StaticDescriptorInitializer_$filename$
    depend on whether LITE_RUNTIME is enabled. Note that this works only when
    extensions are not used.
    
    This lets us significantly decrease the number of static initializers generated
    by protoc in LITE_RUNTIME mode (used in Chromium).
    In LITE_RUNTIME mode, $adddescriptorsname$() is called the first time that
    default_instance() is called (rather than being called during static init).
    
    To benefit from this patch in LITE_RUNTIME mode without extensions, compile
    with -DGOOGLE_PROTOBUF_NO_STATIC_INIT.
    
    BUG=351
    6103d4ed
Name
Last commit
Last update
..
protobuf Loading commit data...