[clang] [clang][test][z/OS]Make the z/OS target check at runtime so cross compile unit test works (PR #248972)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 08:50:46 PST 2026
mstorsjo wrote:
I think the direction of the change is reasonable, but the PR subject is a bit cryptic.
It's not about whether you cross compile the unit test executable itself or not, but whether the target OS of the build of clang is the same as `LLVM_DEFAULT_TARGET_TRIPLE`. I.e. either if you are _not_ cross compiling clang, but you have set `LLVM_DEFAULT_TARGET_TRIPLE` to target different than the local system, or, if you're cross compiling clang but also have set `LLVM_DEFAULT_TARGET_TRIPLE` to something _else_ than the cross compilation target.
If you just cross compile clang but don't set `LLVM_DEFAULT_TARGET_TRIPLE`, but let it be the default (the same as the host for which you cross compile clang), then I don't think this should be an issue?
IMO if we do this, we should make the check at runtime for all the targets, not just for z/OS.
https://github.com/llvm/llvm-project/pull/248972
More information about the cfe-commits
mailing list