def get_build_os_arch(conanfile):
    """ Returns the value for the 'os' and 'arch' settings for the build context """
    if hasattr(conanfile, 'settings_build'):
        return conanfile.settings_build.get_safe('os'
            ), conanfile.settings_build.get_safe('arch')
    else:
        return conanfile.settings.get_safe('os_build'
            ), conanfile.settings.get_safe('arch_build')
