b8a6617 BaseTools/Source/C: split "-O2" to BUILD_OPTFLAGS

Authored and Committed by lersek 5 years ago
    BaseTools/Source/C: split "-O2" to BUILD_OPTFLAGS
    
    The option "-O2" is not a preprocessor flag, but a code generation
    (compilation) flag. Move it from BUILD_CPPFLAGS to BUILD_CFLAGS and
    BUILD_CXXFLAGS.
    
    Because "VfrCompile/GNUmakefile" uses "-O2" through BUILD_CPPFLAGS, and
    because it doesn't use BUILD_CXXFLAGS, we have to introduce BUILD_OPTFLAGS
    separately, so that "VfrCompile/GNUmakefile" can continue using just this
    flag.
    
    This patch doesn't change behavior.
    
    Cc: Liming Gao <liming.gao@intel.com>
    Cc: Yonghong Zhu <yonghong.zhu@intel.com>
    Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1540244
    Contributed-under: TianoCore Contribution Agreement 1.1
    Signed-off-by: Laszlo Ersek <lersek@redhat.com>
    Reviewed-by: Liming Gao <liming.gao@intel.com>