Midhunesh d783723a58
[compiler-rt] Update runtime build script to detect RPC XDR header for AIX (#186977)
`sanitizer_common` and its tests depend on the RPC XDR header for layout
compatibility. When this header is absent from a CI or build
environment, changes that silently break the expected struct layout go
undetected, since there is nothing to fail the build.
The default is opt-in — error on missing header is on by default for AIX
(where the dependency is known and the package is `bos.net.nfs.adt`) and
off by default elsewhere.

Changes:

1. On AIX, checks for `tirpc/rpc/xdr.h`; on all other platforms, checks
for `rpc/xdr.h`
2. Introduces `COMPILER_RT_REQUIRE_RPC_XDR_H` CMake option (default ON
on AIX, OFF elsewhere) that, when set, turns a missing header into a
fatal configuration error with an actionable message
3. Drive-by fix: Normalizes `HAVE_RPC_XDR_H` to 0 when the header is
absent, for consistent downstream `if()/#cmakedefine` behavior
2026-03-18 19:52:22 +05:30
..