xref: /llvm-project/clang/test/Driver/config-zos.c (revision 57b80e8b1a7eaa5b8b9114e4bb2395e0d05c75a5)
1*57b80e8bSSean Perry // REQUIRES: shell
2*57b80e8bSSean Perry // REQUIRES: systemz-registered-target
3*57b80e8bSSean Perry 
4*57b80e8bSSean Perry // RUN: unset CLANG_NO_DEFAULT_CONFIG
5*57b80e8bSSean Perry // RUN: rm -rf %t && mkdir %t
6*57b80e8bSSean Perry 
7*57b80e8bSSean Perry // RUN: mkdir -p %t/testbin
8*57b80e8bSSean Perry // RUN: mkdir -p %t/etc
9*57b80e8bSSean Perry // RUN: ln -s %clang %t/testbin/clang
10*57b80e8bSSean Perry // RUN: echo "-DXYZ=789" >%t/etc/clang.cfg
11*57b80e8bSSean Perry // RUN: %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes %s 2>&1 | FileCheck -DDIR=%t %s
12*57b80e8bSSean Perry // RUN: %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes --no-default-config %s 2>&1 | FileCheck -check-prefix=NOCONFIG %s
13*57b80e8bSSean Perry //
14*57b80e8bSSean Perry // CHECK: Configuration file: [[DIR]]/etc/clang.cfg
15*57b80e8bSSean Perry // CHECK: "-D" "XYZ=789"
16*57b80e8bSSean Perry // NOCONFIG-NOT: Configuration file: {{.*}}/etc/clang.cfg
17*57b80e8bSSean Perry // NOCONFIG-NOT: "-D" "XYZ=789"
18