[compiler-rt][builtins] Add compiler flags to catch potential errors
that can lead to security vulnerabilities

Also, fix a few places that were causing -Wshadow and
-Wformat-nonliteral warnings to be emitted.

Differential Revision: https://reviews.llvm.org/D131714

GitOrigin-RevId: 5f886adbfd7c09f7883589ec9d85c04a08335043
7 files changed