Much like a freestanding implementation, the way to request a hardened implementation is left for the implementation to define. For example, similarly to -ffreestanding, we expect that most toolchains would provide a compiler flag like -fhardened, but other alternatives like a -D_LIBCPP_HARDENING_MODE=<mode> macro would also be conforming.
see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3471r2.html#enabling-hardening