Fix dependency on python hash seed

Sort the list of targets before writing them to the output, which fixes
the only place where output ordering depended on the python hash seed.
Also remove the fixed python hash seed from the script.

Test: android_tools/generate_android_bp.sh && git diff
Test: mma
Change-Id: Icfadfaaebf438d00bfef13c231fc09afda454916
This commit is contained in:
Colin Cross
2023-02-24 15:23:17 -08:00
parent fc77d0a038
commit a626e135fb
3 changed files with 20230 additions and 20230 deletions

40456
Android.bp

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ fi
DIR=$(dirname $0) DIR=$(dirname $0)
PYTHONHASHSEED=31 "${DIR}"/generate_bp.py "$DIR" >"${DIR}/../Android.bp" "${DIR}"/generate_bp.py "$DIR" >"${DIR}/../Android.bp"
bpfmt -w "${DIR}/../Android.bp" bpfmt -w "${DIR}/../Android.bp"

View File

@ -703,7 +703,7 @@ PrintHeader()
GenerateDefault(targets) GenerateDefault(targets)
print('\n\n') print('\n\n')
for target in targets.values(): for name, target in sorted(targets.items()):
typ = target['type'] typ = target['type']
if typ == 'static_library': if typ == 'static_library':
GenerateStaticLib(target, targets) GenerateStaticLib(target, targets)