xref: /llvm-project/clang/test/Driver/XRay/xray-mode-flags.cpp (revision 0428f2cb5a91cc93897252c9dc4883efea3dbd9a)
1 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=xray-fdr %s 2>&1 \
2 // RUN:   | FileCheck --check-prefix=FDR %s
3 // RUN: %clang -### --target=aarch64-linux-gnu -fxray-instrument -fxray-modes=xray-basic %s 2>&1 \
4 // RUN:   | FileCheck --check-prefix=BASIC %s
5 // RUN: %clang -### --target=aarch64-linux-gnu -fxray-instrument %s 2>&1 \
6 // RUN:   | FileCheck --check-prefixes=FDR,BASIC %s
7 // RUN: %clang -### --target=s390x-linux-gnu -fxray-instrument -fxray-modes=xray-basic %s 2>&1 \
8 // RUN:   | FileCheck --check-prefix=BASIC %s
9 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=all %s 2>&1 \
10 // RUN:   | FileCheck --check-prefixes=FDR,BASIC %s
11 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=xray-fdr,xray-basic %s 2>&1 \
12 // RUN:   | FileCheck --check-prefixes=FDR,BASIC %s
13 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=xray-fdr -fxray-modes=xray-basic %s 2>&1 \
14 // RUN:   | FileCheck --check-prefixes=FDR,BASIC %s
15 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=none %s 2>&1 \
16 // RUN:   | FileCheck --check-prefix=NONE %s
17 //
18 // We also should support overriding the modes in an additive manner.
19 
20 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=none,xray-fdr %s 2>&1 \
21 // RUN:   | FileCheck --check-prefix=FDR %s
22 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=all,none %s 2>&1 \
23 // RUN:   | FileCheck --check-prefix=NONE %s
24 
25 // We also should support having the individual modes be concatenated.
26 
27 // RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=none -fxray-modes=xray-fdr %s 2>&1 \
28 // RUN:   | FileCheck --check-prefix=FDR %s
29 
30 // BASIC: libclang_rt.xray-basic
31 // FDR: libclang_rt.xray-fdr
32 // NONE-NOT: libclang_rt.xray-basic
33 // NONE-NOT: libclang_rt.xray-fdr
34