File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -530,6 +530,16 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
530
530
}
531
531
Add &= Supported;
532
532
533
+ // Msan is not supported on Android
534
+ if ((Add & SanitizerKind::Memory) && TC.getTriple ().isAndroid ()) {
535
+ if (DiagnoseErrors) {
536
+ D.Diag (diag::warn_drv_unsupported_option_for_target)
537
+ << " -fsanitize=memory" << Triple.str ();
538
+ }
539
+ DiagnosedKinds |= SanitizerKind::Memory;
540
+ Add &= ~SanitizerKind::Memory;
541
+ }
542
+
533
543
// Test for -fno-rtti + explicit -fsanitizer=vptr before expanding groups
534
544
// so we don't error out if -fno-rtti and -fsanitize=undefined were
535
545
// passed.
Original file line number Diff line number Diff line change 399
399
// RUN: %clang --target=arm-linux-androideabi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-NO-ASAN
400
400
// CHECK-ANDROID-NO-ASAN: "-mrelocation-model" "pic"
401
401
402
+ // RUN: %clang --target=aarch64-linux-android -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-ANDROID
403
+ // RUN: %clang --target=i386-linux-android -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-ANDROID
404
+ // RUN: %clang --target=x86_64-linux-android -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-ANDROID
405
+ // CHECK-MSAN-ANDROID: ignoring '-fsanitize=memory' option as it is not currently supported for target
406
+
402
407
// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN
403
408
// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN
404
409
// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=all -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN
You can’t perform that action at this time.
0 commit comments