@memoize
def get_link_args(unwind):
    platform_val = chpl_platform.get('target')
    osx = platform_val.startswith('darwin')
    if osx:
        return []
    libs = []
    if (unwind == 'system'):
        libs = third_party_utils.pkgconfig_get_link_args('libunwind', system=True, static=True)
    elif (unwind == 'bundled'):
        libs = third_party_utils.default_get_link_args('libunwind', libs=['libunwind.la', 'libunwind-x86_64.la'])
    if ('-ldl' not in libs):
        libs.append('-ldl')
    return libs
@memoize
def get_link_args(unwind):
    platform_val = chpl_platform.get('target')
    osx = platform_val.startswith('darwin')
    if osx:
        return []
    libs = []
    if (unwind == 'system'):
        libs = third_party_utils.pkgconfig_get_link_args('libunwind', system=True, static=True)
    elif (unwind == 'bundled'):
        libs = third_party_utils.default_get_link_args('libunwind', libs=['libunwind.la', 'libunwind-x86_64.la'])
    if ('-ldl' not in libs):
        libs.append('-ldl')
    return libs