1 | // RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s -### |
2 | // RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s -### 2>&1 | \ |
3 | // RUN: FileCheck %s --check-prefix=SHARED |
4 | // RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -### -DMAIN |
5 | // RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -### 2>&1 -DMAIN \ |
6 | // RUN: | FileCheck %s --check-prefix=STATIC |
7 | // |
8 | // SHARED-NOT: {{clang_rt\.xray-}} |
9 | // STATIC: {{clang_rt\.xray-}} |
10 | // |
11 | // REQUIRES: linux, enable_shared |
12 | int foo() { return 42; } |
13 | |
14 | #ifdef MAIN |
15 | int main() { return foo(); } |
16 | #endif |
17 | |