diff --git a/python/google/protobuf/link_error_fast_cpp.cc b/python/google/protobuf/link_error_fast_cpp.cc index d1b7ebb211..ef3380e2c2 100644 --- a/python/google/protobuf/link_error_fast_cpp.cc +++ b/python/google/protobuf/link_error_fast_cpp.cc @@ -4,15 +4,16 @@ namespace google { namespace protobuf { namespace python { -// This exists solely to cause a build/link time error when both -// :use_fast_cpp_protos and :use_pure_python are specified in a build.; +// This exists solely to cause a build/link time error when more than one of +// :use_upb_protos, :use_fast_cpp_protos and :use_pure_python are specified +// in a build.; extern "C" { // MUST match link_error_pure_python.cc's function signature. __attribute__((noinline)) __attribute__((optnone)) int -go_SLASH_build_deps_on_BOTH_use_fast_cpp_protos_AND_use_pure_python() { +go_SLASH_build_deps_on_multiple_python_proto_backends() { return 1; } diff --git a/python/google/protobuf/link_error_pure_python.cc b/python/google/protobuf/link_error_pure_python.cc index 978e897a65..5093c3e01d 100644 --- a/python/google/protobuf/link_error_pure_python.cc +++ b/python/google/protobuf/link_error_pure_python.cc @@ -4,15 +4,16 @@ namespace google { namespace protobuf { namespace python { -// This exists solely to cause a build/link time error when both -// :use_fast_cpp_protos and :use_pure_python are specified in a build.; +// This exists solely to cause a build/link time error when more than one of +// :use_upb_protos, :use_fast_cpp_protos and :use_pure_python are specified +// in a build.; extern "C" { // MUST match link_error_pure_python.cc's function signature. __attribute__((noinline)) __attribute__((optnone)) int -go_SLASH_build_deps_on_BOTH_use_fast_cpp_protos_AND_use_pure_python() { +go_SLASH_build_deps_on_multiple_python_proto_backends() { return 0; } diff --git a/python/google/protobuf/link_error_upb.cc b/python/google/protobuf/link_error_upb.cc index 2225a10dc2..1af3d15331 100644 --- a/python/google/protobuf/link_error_upb.cc +++ b/python/google/protobuf/link_error_upb.cc @@ -13,7 +13,7 @@ extern "C" { // MUST match link_error_pure_python.cc's function signature. __attribute__((noinline)) __attribute__((optnone)) int -go_SLASH_build_deps_on_BOTH_use_fast_cpp_protos_AND_use_pure_python() { +go_SLASH_build_deps_on_multiple_python_proto_backends() { return 2; }