[clang] Set the default arch for z/OS to be arch10 (PR #89854)

Sean Perry via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 11:21:18 PDT 2024


perry-ca wrote:

> We are trying to remove such cmake variables in favor of configuration file.

I'm not sure which configuration file(s) you are referring to.  I assume you mean the cache files in clang/cmake/caches.  If so, I don't think we want to put it there because `CLANG_SYSTEMZ_ZOS_DEFAULT_ARCH` is a value defined for all the builds.  It's not a value controlling how the build is done and we aren't trying to override the value of `CLANG_SYSTEMZ_DEFAULT_ARCH` for a particular build configuration.

I might need to explain some more.  If the user compiles with `-target=s390x-unknown-linux` then the default arch is arch8/z10.  If the user compiles with `-target=s390x-ibm-zos` then the default arch is arch10/zEC12.  The arch value is determined at runtime when clang is run.  I could see us using a cache file to override the value of `CLANG_SYSTEMZ_DEFAULT_ARCH` if both values weren't needed by the compiler at the same time.

https://github.com/llvm/llvm-project/pull/89854


More information about the cfe-commits mailing list