--- modpagespeed-1.9.32.4/third_party/protobuf/protobuf.gyp.orig 2015-07-14 01:17:15.000000000 +0200 +++ modpagespeed-1.9.32.4/third_party/protobuf/protobuf.gyp 2020-07-05 14:36:08.211183327 +0200 @@ -430,6 +430,33 @@ }, }, { + 'target_name': 'protobuf_full_do_not_use', + 'type': 'none', + 'direct_dependent_settings': { + 'cflags': [ + ', which requires RTTI. + 'GOOGLE_PROTOBUF_NO_RTTI', + 'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER', + ], + }, + 'link_settings': { + # Use full protobuf, because vanilla protobuf doesn't have + # our custom patch to retain unknown fields in lite mode. + 'ldflags': [ + ' <(protoc_out_dir)/<(instaweb_protoc_subdir)/<(RULE_INPUT_ROOT).proto && <(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX) --proto_path=<(protoc_out_dir)/ <(protoc_out_dir)/<(instaweb_protoc_subdir)/<(RULE_INPUT_ROOT).proto --cpp_out=<(protoc_out_dir)', + 'cat <(instaweb_root)/<(instaweb_protoc_subdir)/<(RULE_INPUT_NAME) | sed \'s!"third_party/pagespeed!"pagespeed!\' | sed \'s!// \[opensource\] !!\' > <(protoc_out_dir)/<(instaweb_protoc_subdir)/<(RULE_INPUT_ROOT).proto && <(protoc_executable) --proto_path=<(protoc_out_dir)/ <(protoc_out_dir)/<(instaweb_protoc_subdir)/<(RULE_INPUT_ROOT).proto --cpp_out=<(protoc_out_dir)', ], }, ],