Skip to content

Commit

Permalink
Sort symbol names when creating a new script.
Browse files Browse the repository at this point in the history
Test: ./annotate_version_script.py --create libz.so.json \
          ../../external/zlib/libz.map.txt
Bug: None
Change-Id: I486abef8033eef180ac8cab7dd68aac3f52b5504
  • Loading branch information
DanAlbert committed Sep 15, 2016
1 parent fdb88fe commit 4b78efd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ndk/annotate_version_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
"""Annotates an existing version script with data for the NDK."""
import argparse
import collections
import json
import logging
import os
Expand Down Expand Up @@ -153,6 +154,8 @@ def annotate_version_script(version_script, json_db, lines):

def create_version_script(version_script, json_db):
"""Creates a new version script based on an NDK library definition."""
json_db = collections.OrderedDict(sorted(json_db.items()))

version_script.write('LIB {\n')
version_script.write(' global:\n')
for symbol in json_db.keys():
Expand Down

0 comments on commit 4b78efd

Please sign in to comment.