Allow defining `IREE_HOST_SIZE_T` to other types. (#14040)
I tried redefining these:
```c
// iree/base/config.h
#if !defined(IREE_HOST_SIZE_T)
#define IREE_HOST_SIZE_T size_t
#define PRIhsz "zu"
#endif // !IREE_HOST_SIZE_T
```
to `uint32_t` and `PRIu32` while debugging some issues with Emscripten
builds, but many parts of the project failed to build.
`IREE_HOST_SIZE_T` should really be set to `size_t` in most/all cases,
but the project should still build if someone wants to redefine it.
Some cases were obviously using the wrong format specifier (e.g. `zu`
instead of `PRIhsz`), but other were more subtle (e.g. interop between
`std::string` with `iree_string_view_t` or using `SIZE_MAX` instead of
`IREE_HOST_SIZE_MAX`). I tried to update as many places as I could
safely.
diff --git a/experimental/webgpu/command_buffer.c b/experimental/webgpu/command_buffer.c
index b5d783d..84af3a1 100644
--- a/experimental/webgpu/command_buffer.c
+++ b/experimental/webgpu/command_buffer.c
@@ -746,7 +746,8 @@
if (IREE_UNLIKELY(offset + values_length >=
sizeof(command_buffer->state.push_constants))) {
return iree_make_status(IREE_STATUS_INVALID_ARGUMENT,
- "push constant range %zu (length=%zu) out of range",
+ "push constant range %" PRIhsz " (length=%" PRIhsz
+ ") out of range",
offset, values_length);
}