1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* StringZilla platform probe: COMPILES only when `<stringzilla/stringzilla.h>` performs real runtime
* capability detection for this target (`SZ_CAPABILITIES_RUNTIME_DETECTABLE_`).
*
* The sibling `run_capabilities.c` answers "what does this machine support" by executing - which a cross
* build can never do. This probe answers the prior question, "will the built library mask unsupported
* tiers at load?", with a plain try-compile that works for any target. Runtime-dispatched builds use it
* to pick their gate: where detection exists, the load-time dispatch table masks whatever the CPU lacks,
* so every compilable tier is safe to enable; where it does not (WebAssembly by nature - a module with
* unsupported SIMD opcodes fails validation at instantiation - or OS-less exotic targets), the dispatch
* table just mirrors the compile-time mask and the build must stay within the target description.
*
* The answer lives in the header, next to the detectors themselves, so neither CMake nor `build.rs`
* carries a platform list that could drift out of sync. Compile with the same `SZ_AVOID_LIBC` value as
* the real build - detectability depends on it where the probe reads the auxiliary vector.
*/
int