Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build] Added ws2_32 to address_sorting (grpc#38648)
Fix missing windows symbol linker errors found when adding gRPC to BCR (From bazelbuild/bazel-central-registry#3671). ``` C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\link.exe @bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting_6658ee4b.dll-0.params # Configuration: 5b453b61a931a5d60d186b4b1192045ad0e097a738f75edb2ec811e836145bd1 # Execution platform: @@platforms//host:host Creating library bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.lib and object bazel-out/x64_windows-fastbuild/bin/external/grpc+/third_party/address_sorting/address_sorting.if.exp address_sorting.obj : error LNK2019: unresolved external symbol __imp_htonl referenced in function in6_is_addr_loopback address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_closesocket referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_connect referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_getsockname referenced in function address_sorting_create_source_addr_factory_for_current_platform address_sorting_windows.obj : error LNK2019: unresolved external symbol __imp_socket referenced in function address_sorting_create_source_addr_factory_for_current_platform bazel-out\x64_windows-fastbuild\bin\external\grpc+\third_party\address_sorting\address_sorting_6658ee4b.dll : fatal error LNK1120: 5 unresolved externals ``` This issue wasn't caught by out CI, likely due to BCR presubmit's use of stricter layering_check. Regardless, it's good as it correctly defines the `address_sorting` Bazel target's dependency. Closes grpc#38648 PiperOrigin-RevId: 721549737
- Loading branch information