Skip to content

Commit

Permalink
add back (DY)?LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Aug 10, 2018
1 parent b7e48c1 commit 329a0df
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/python/pants/backend/python/subsystems/python_native_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,19 @@ def as_environment(self):
cpp_linker.path_entries)
ret['PATH'] = create_path_env_var(all_path_entries)

all_library_dirs = (
c_compiler.library_dirs +
c_linker.library_dirs +
cpp_compiler.library_dirs +
cpp_linker.library_dirs)
joined_library_dirs = create_path_env_var(all_library_dirs)
dynamic_lib_env_var = plat.resolve_platform_specific({
'darwin': lambda: 'DYLD_LIBRARY_PATH',
'linux': lambda: 'LD_LIBRARY_PATH',
})
# Clang needs GCC's libstdc++.so.6 to run on Linux
ret[dynamic_lib_env_var] = joined_library_dirs

ret['CC'] = c_compiler.exe_filename
ret['CXX'] = cpp_compiler.exe_filename
ret['LDSHARED'] = cpp_linker.exe_filename
Expand Down

0 comments on commit 329a0df

Please sign in to comment.