Example #1
0
def get_link_args(flag, mem_val):
    if mem_val == 'bundled':
        jemalloc_config = get_jemalloc_config_file(flag)
        install_path = third_party_utils.get_cfg_install_path(
            'jemalloc', host_or_target=flag)
        lib_path = os.path.join(install_path, 'lib')
        libs = ['-L{}'.format(lib_path), '-ljemalloc']
        # should this be an error if we can't find it?
        if os.access(jemalloc_config, os.X_OK):
            jemalloc_libs = run_command([jemalloc_config, '--libs'])
            libs += jemalloc_libs.split()
        return libs
    elif mem_val == 'system':
        return ['-ljemalloc']
    else:
        return []
def get_jemalloc_config_file():
    install_path = third_party_utils.get_cfg_install_path('jemalloc')
    config_file = os.path.join(install_path, 'bin', 'jemalloc-config')
    return config_file
def get_jemalloc_config_file():
    install_path = third_party_utils.get_cfg_install_path('jemalloc')
    config_file = os.path.join(install_path, 'bin', 'jemalloc-config')
    return config_file
Example #4
0
def get_jemalloc_config_file(flag='target'):
    install_path = third_party_utils.get_cfg_install_path('jemalloc',
                                                          host_or_target=flag)
    config_file = os.path.join(install_path, 'bin', 'jemalloc-config')
    return config_file