parameters: (target_src, target_dst, config)
docstring: See relocate_deps(). Linux implementation.
docstring_summary: See relocate_deps(). Linux implementation.
docstring_tokens: See relocate_deps () . Linux implementation .
function: def relocate_deps_linux(target_src, target_dst, config):
    """
    See relocate_deps(). Linux implementation.
    """
    NEW_RPATH = '$ORIGIN/../lib'
  
    # Make sure we have the chrpath command available in the Linux build.
    check_for_command('chrpath')
  
    # Copy the linked libraries.
    dep_extractor = DependencyExtractor()
    dep_extractor.set_library_filter(lambda path: False if PAT_LINUX_LIB_EXCLUDE.search(path) else True)
    libs = dep_extractor.extract_deps(target_src)
    for lib_src in libs:
      lib_dst = os.path.join(config[ARTIFACT_LIB_DIR], os.path.basename(lib_src))
      copy_file(lib_src, lib_dst)
      # We have to set the RUNPATH of the shared objects as well for transitive
      # dependencies to be properly resolved. $ORIGIN is always relative to the
      # running executable.
      chrpath(lib_dst, NEW_RPATH)
  
    # We must also update the RUNPATH of the executable itself to look for its
    # dependencies in a relative location.
    chrpath(target_dst, NEW_RPATH)
function_tokens: def relocate_deps_linux ( target_src , target_dst , config ) : NEW_RPATH = '$ORIGIN/../lib' # Make sure we have the chrpath command available in the Linux build. check_for_command ( 'chrpath' ) # Copy the linked libraries. dep_extractor = DependencyExtractor ( ) dep_extractor . set_library_filter ( lambda path : False if PAT_LINUX_LIB_EXCLUDE . search ( path ) else True ) libs = dep_extractor . extract_deps ( target_src ) for lib_src in libs : lib_dst = os . path . join ( config [ ARTIFACT_LIB_DIR ] , os . path . basename ( lib_src ) ) copy_file ( lib_src , lib_dst ) # We have to set the RUNPATH of the shared objects as well for transitive # dependencies to be properly resolved. $ORIGIN is always relative to the # running executable. chrpath ( lib_dst , NEW_RPATH ) # We must also update the RUNPATH of the executable itself to look for its # dependencies in a relative location. chrpath ( target_dst , NEW_RPATH )