Asan runtime library is always shared on Android, and -shared-libasan is no-op.
Suppress the unused argument warning.
llvm-svn: 210252
if (NeedsAsan) {
AsanSharedRuntime =
- (TC.getTriple().getEnvironment() == llvm::Triple::Android) ||
- Args.hasArg(options::OPT_shared_libasan);
+ Args.hasArg(options::OPT_shared_libasan) ||
+ (TC.getTriple().getEnvironment() == llvm::Triple::Android);
AsanZeroBaseShadow =
(TC.getTriple().getEnvironment() == llvm::Triple::Android);
}
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target arm-linux-androideabi -fsanitize=address \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared-libasan \
+// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID-SHARED-LIBASAN %s
+//
+// CHECK-ASAN-ANDROID-SHARED-LIBASAN-NOT: argument unused during compilation: '-shared-libasan'
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target arm-linux-androideabi -fsanitize=address \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID-SHARED %s
//