| 1 | // Build an executable with ASan, then extract the DLLs that it depends on. |
| 2 | // RUN: %clang_cl_asan %s %Fe%t.exe |
| 3 | // RUN: llvm-readobj --coff-imports %t.exe | grep Name: | sed -e 's/ *Name: *//' > %t |
| 4 | // |
| 5 | // Make sure the binary doesn't depend on dbghelp directly. |
| 6 | // RUN: not grep dbghelp.dll %t |
| 7 | // |
| 8 | // Make sure any clang_rt DLLs it depends on don't depend on dbghelp. In the |
| 9 | // static build, there won't be any clang_rt DLLs. |
| 10 | // RUN: not grep cl""ang_rt %t || \ |
| 11 | // RUN: grep cl""ang_rt %t | xargs which | \ |
| 12 | // RUN: xargs llvm-readobj --coff-imports | not grep dbghelp.dll |
| 13 | |
| 14 | extern "C" int puts(const char *); |
| 15 | |
| 16 | int main() { |
| 17 | puts("main" ); |
| 18 | } |
| 19 | |