What's the default optimization level (e.g. -O2, -O3) used by the function CreateLibrary, which invokes the system compiler to compile C/C++ code for use in LibraryLink?
This depends on the specific compiler driver that is being used.
The easiest way to get not only the compiler options, but the entire compilation command is to add
"ShellCommandFunction" -> Print to
CreateLibrary (or whichever function you used to compile).