From 9644e588f6ef011ec8e0d6f58d5c2cdb04eb0f03 Mon Sep 17 00:00:00 2001
From: Alex Polcyn <apolcyn@google.com>
Date: Wed, 27 Feb 2019 23:01:24 -0800
Subject: [PATCH] Build c-ares bazel lib with alwayslink=1

---
 test/cpp/end2end/cfstream_test.cc | 3 ---
 third_party/cares/cares.BUILD     | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/test/cpp/end2end/cfstream_test.cc b/test/cpp/end2end/cfstream_test.cc
index 9039329d815..6ca206e5f36 100644
--- a/test/cpp/end2end/cfstream_test.cc
+++ b/test/cpp/end2end/cfstream_test.cc
@@ -270,9 +270,6 @@ int main(int argc, char** argv) {
   ::testing::InitGoogleTest(&argc, argv);
   grpc_test_init(argc, argv);
   gpr_setenv("grpc_cfstream", "1");
-  // TODO (pjaikumar): remove the line below when
-  // https://github.com/grpc/grpc/issues/18080 has been fixed.
-  gpr_setenv("GRPC_DNS_RESOLVER", "native");
   const auto result = RUN_ALL_TESTS();
   return result;
 }
diff --git a/third_party/cares/cares.BUILD b/third_party/cares/cares.BUILD
index 54b8c57b1d6..ffa03aeb12c 100644
--- a/third_party/cares/cares.BUILD
+++ b/third_party/cares/cares.BUILD
@@ -170,4 +170,5 @@ cc_library(
     visibility = [
         "//visibility:public",
     ],
+    alwayslink = 1,
 )