@memoize
def get():
    platform_val = chpl_platform.get('target')
    linux = platform_val.startswith('linux64')
    osx = platform_val.startswith('darwin')
    val = overrides.get('CHPL_UNWIND')
    if (val == 'libunwind'):
        warning('CHPL_UNWIND=libunwind is deprecated. Use CHPL_UNWIND=bundled.')
        val = 'bundled'
    if linux:
        if (val == 'bundled'):
            return 'bundled'
        elif (val == 'system'):
            return 'system'
    if osx:
        if (val == 'bundled'):
            error('Using CHPL_UNWIND=bundled is not supported on Mac OS X.\nUse CHPL_UNWIND=system instead.', ValueError)
        elif (val == 'system'):
            return 'system'
    return 'none'
@memoize
def get():
    platform_val = chpl_platform.get('target')
    linux = platform_val.startswith('linux64')
    osx = platform_val.startswith('darwin')
    val = overrides.get('CHPL_UNWIND')
    if (val == 'libunwind'):
        warning('CHPL_UNWIND=libunwind is deprecated. Use CHPL_UNWIND=bundled.')
        val = 'bundled'
    if linux:
        if (val == 'bundled'):
            return 'bundled'
        elif (val == 'system'):
            return 'system'
    if osx:
        if (val == 'bundled'):
            error('Using CHPL_UNWIND=bundled is not supported on Mac OS X.\nUse CHPL_UNWIND=system instead.', ValueError)
        elif (val == 'system'):
            return 'system'
    return 'none'