Browse Source

keep LD_LIBRARY_PATH order

from YouDirk's and donnerbrenn's fix at
e1d747c975

this code still removes duplicate entries, though
pull/17/head
PoroCYon 6 months ago
parent
commit
63afc83c4d
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      smol/parse.py

+ 7
- 2
smol/parse.py View File

@ -149,11 +149,16 @@ def get_needed_syms(readelf_bin, inpfile) -> Dict[str, str]: # (symname, relocty
return syms#, needgot
def uniq_list(l):
od = OrderedDict()
for x in l: od[x] = x
return list(od.keys())
def format_cc_path_line(entry):
category, path = entry.split(': ', 1)
path = path.lstrip('=')
return (category, list(set(os.path.realpath(p) \
for p in path.split(':') if os.path.isdir(p))))
return (category, uniq_list(os.path.realpath(p) \
for p in path.split(':') if os.path.isdir(p))[::-1])
def get_cc_paths(cc_bin):


Loading…
Cancel
Save