Driver: implement addClangWarningOptions

This function allows certain platforms to enable or disable diagnostics
by default.