1// RUN: %clangxx_tsan -shared %p/external-lib.cpp -fno-sanitize=thread -DUSE_TSAN_CALLBACKS \
2// RUN: -o %t-lib.dylib -install_name @rpath/`basename %t-lib.dylib`
3
4// RUN: %clangxx_tsan -shared %p/external-noninstrumented-module.cpp %t-lib.dylib -fno-sanitize=thread \
5// RUN: -o %t-module.dylib -install_name @rpath/`basename %t-module.dylib`
6
7// RUN: %clangxx_tsan %s %t-module.dylib -o %t
8// RUN: %run %t 2>&1 | FileCheck %s
9
10#include <stdio.h>
11
12extern "C" void NonInstrumentedModule();
13int main(int argc, char *argv[]) {
14 NonInstrumentedModule();
15 fprintf(stderr, format: "Done.\n");
16}
17
18// CHECK-NOT: WARNING: ThreadSanitizer
19// CHECK: Done.
20

source code of compiler-rt/test/tsan/Darwin/external-ignore-noninstrumented.cpp