def _getCcFlags(build):
    """A wrapper for BuildType.CcFlags that copes with ValueError being raised.
    
    This happens with the GccOptNative build type, since the compile flags are machine-specific.
    """
    try:
        return build.CcFlags()
    except ValueError:
        return "[machine specific optimisations are applied]"