
On z/OS, the location of the system libraries and side decks (aka equivalent to libc, etc) are not in a predefined location. The system does have a default location but sysadmins can change this and frequently do. See the -mzos-hlq* options we have for z/OS. To avoid every user needing to specify these -mzos-hlq* options, we added support for a system install default config file that is always read independent of the usual config file. The compiler will read this customization config file before reading the usual config files. The customization file is called clang.cfg and is located in: - the etc dir within the compiler installation dir. - or specified by the CLANG_CONFIG_PATH env var. This env var can either be a directory or the fill path name of the file.
18 lines
689 B
C
18 lines
689 B
C
// REQUIRES: shell
|
|
// REQUIRES: systemz-registered-target
|
|
|
|
// RUN: unset CLANG_NO_DEFAULT_CONFIG
|
|
// RUN: rm -rf %t && mkdir %t
|
|
|
|
// RUN: mkdir -p %t/testbin
|
|
// RUN: mkdir -p %t/etc
|
|
// RUN: ln -s %clang %t/testbin/clang
|
|
// RUN: echo "-DXYZ=789" >%t/etc/clang.cfg
|
|
// RUN: %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes %s 2>&1 | FileCheck -DDIR=%t %s
|
|
// RUN: %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes --no-default-config %s 2>&1 | FileCheck -check-prefix=NOCONFIG %s
|
|
//
|
|
// CHECK: Configuration file: [[DIR]]/etc/clang.cfg
|
|
// CHECK: "-D" "XYZ=789"
|
|
// NOCONFIG-NOT: Configuration file: {{.*}}/etc/clang.cfg
|
|
// NOCONFIG-NOT: "-D" "XYZ=789"
|