[clang] [z.OS] fix strnlen() usage in Context.cpp available on z/OS (PR #160339)
Sean Perry via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 23 10:48:52 PDT 2025
================
@@ -18,6 +18,7 @@
#include "clang/AST/ASTLambda.h"
#include "clang/AST/Expr.h"
#include "clang/Basic/TargetInfo.h"
+#include "llvm/Support/SystemZ/zOSSupport.h"
----------------
perry-ca wrote:
I think this will get deleted again. The compiles on other platforms are going to say this header is empty and it will get removed again.
What I was thinking should do is:
1. create a wrapper header dir that is just for building llvm. This can live in the llvm repo (or we prereq the zoslib repo which has this already)
- create a stdlib.h that has the strnlen() in it
2. add a -isystem option to include this wrapper.
I'm good with the change. Just worried it will get undone.
https://github.com/llvm/llvm-project/pull/160339
More information about the cfe-commits
mailing list