forked from OSchip/llvm-project
Fix driver warning about -pthread on Android.
-pthread is no-op on Android. Suppress the unused argument warning. llvm-svn: 210253
This commit is contained in:
parent
6f0ae18a59
commit
dad9206564
|
@ -7189,9 +7189,9 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
}
|
||||
AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
|
||||
|
||||
if (!isAndroid &&
|
||||
(Args.hasArg(options::OPT_pthread) ||
|
||||
Args.hasArg(options::OPT_pthreads) || UsedOpenMPLib != LibUnknown))
|
||||
if ((Args.hasArg(options::OPT_pthread) ||
|
||||
Args.hasArg(options::OPT_pthreads) || UsedOpenMPLib != LibUnknown) &&
|
||||
!isAndroid)
|
||||
CmdArgs.push_back("-lpthread");
|
||||
|
||||
CmdArgs.push_back("-lc");
|
||||
|
|
|
@ -895,6 +895,12 @@
|
|||
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
|
||||
// CHECK-ANDROID-PTHREAD-NOT: -lpthread
|
||||
//
|
||||
// RUN: %clang -no-canonical-prefixes %t.o -### -o %t 2>&1 \
|
||||
// RUN: --target=arm-linux-androideabi -pthread \
|
||||
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD-LINK %s
|
||||
// CHECK-ANDROID-PTHREAD-LINK-NOT: argument unused during compilation: '-pthread'
|
||||
//
|
||||
// Check linker invocation on Debian 6 MIPS 32/64-bit.
|
||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||
// RUN: --target=mipsel-linux-gnu \
|
||||
|
|
Loading…
Reference in New Issue