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 | |
12 | extern "C" void NonInstrumentedModule(); |
13 | int main(int argc, char *argv[]) { |
14 | NonInstrumentedModule(); |
15 | fprintf(stderr, format: "Done.\n" ); |
16 | } |
17 | |
18 | // CHECK-NOT: WARNING: ThreadSanitizer |
19 | // CHECK: Done. |
20 | |