[PATCH] D127145: [Driver] add -lresolv for all but Android.
Kevin Athey via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 15:50:02 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6dce56b2a308: [Driver] add -lresolv for all but Android. (authored by kda).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127145/new/
https://reviews.llvm.org/D127145
Files:
clang/lib/Driver/ToolChains/CommonArgs.cpp
compiler-rt/test/msan/Linux/b64.cpp
compiler-rt/test/msan/Linux/dn_expand.cpp
compiler-rt/test/sanitizer_common/TestCases/Linux/b64.cpp
compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp
Index: compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp
===================================================================
--- compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp
+++ compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp
@@ -1,7 +1,4 @@
-// RUN: %clangxx %s -o %t -lresolv && %run %t %p
-
-// -lresolv fails on Android.
-// UNSUPPORTED: android
+// RUN: %clangxx %s -o %t && %run %t %p
#include <assert.h>
#include <resolv.h>
Index: compiler-rt/test/sanitizer_common/TestCases/Linux/b64.cpp
===================================================================
--- compiler-rt/test/sanitizer_common/TestCases/Linux/b64.cpp
+++ compiler-rt/test/sanitizer_common/TestCases/Linux/b64.cpp
@@ -1,7 +1,4 @@
-// RUN: %clangxx %s -o %t -lresolv && %run %t %p
-
-// -lresolv fails on Android.
-// UNSUPPORTED: android
+// RUN: %clangxx %s -o %t && %run %t %p
#include <assert.h>
#include <resolv.h>
Index: compiler-rt/test/msan/Linux/dn_expand.cpp
===================================================================
--- compiler-rt/test/msan/Linux/dn_expand.cpp
+++ compiler-rt/test/msan/Linux/dn_expand.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx_msan -O0 %s -o %t -lresolv && %run %t
+// RUN: %clangxx_msan -O0 %s -o %t && %run %t
#include <assert.h>
#include <resolv.h>
Index: compiler-rt/test/msan/Linux/b64.cpp
===================================================================
--- compiler-rt/test/msan/Linux/b64.cpp
+++ compiler-rt/test/msan/Linux/b64.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx_msan -O0 %s -o %t -lresolv && %run %t
+// RUN: %clangxx_msan -O0 %s -o %t && %run %t
// RUN: not %run %t NTOP_READ 2>&1 | FileCheck %s --check-prefix=NTOP_READ
// RUN: not %run %t PTON_READ 2>&1 | FileCheck %s --check-prefix=PTON_READ
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -838,6 +838,9 @@
TC.getTriple().isOSNetBSD() ||
TC.getTriple().isOSOpenBSD())
CmdArgs.push_back("-lexecinfo");
+ // There is no libresolv on Android.
+ if (!TC.getTriple().isAndroid())
+ CmdArgs.push_back("-lresolv");
}
static void
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127145.434637.patch
Type: text/x-patch
Size: 2261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220606/ff584657/attachment.bin>
More information about the cfe-commits
mailing list