... actually make it deterministic

This commit is contained in:
PoroCYon 2019-06-15 23:56:11 +02:00 committed by PoroCYon
parent 9f03bcf3a6
commit 2f535befa2
1 changed files with 2 additions and 2 deletions

View File

@ -7,8 +7,8 @@ from smolshared import *
def sort_imports(libraries, hashfn): def sort_imports(libraries, hashfn):
#eprintf("in: " + str(libraries)) #eprintf("in: " + str(libraries))
# sort libs by name length # sort libs by name length, then by name
ll = sorted(libraries.items(), key=lambda ls: len(ls[0])) ll = sorted(libraries.items(), key=lambda ls: (len(ls[0]), ls[0]))
for i in range(len(ll)): for i in range(len(ll)):
# sort symbols by hash value # sort symbols by hash value