diff options
| -rw-r--r-- | build/external_resources/yexport/public.resources.json | 6 | ||||
| -rw-r--r-- | build/external_resources/yexport/resources.json | 6 | ||||
| -rw-r--r-- | build/scripts/export_script_gen.py | 26 | ||||
| -rw-r--r-- | build/scripts/generate_vcs_info.py | 40 |
4 files changed, 35 insertions, 43 deletions
diff --git a/build/external_resources/yexport/public.resources.json b/build/external_resources/yexport/public.resources.json index 18fc16c5831..9f80f74e294 100644 --- a/build/external_resources/yexport/public.resources.json +++ b/build/external_resources/yexport/public.resources.json @@ -1,13 +1,13 @@ { "by_platform": { "darwin": { - "uri": "sbr:5473281398" + "uri": "sbr:5433628204" }, "darwin-arm64": { - "uri": "sbr:5473294395" + "uri": "sbr:5433626802" }, "linux": { - "uri": "sbr:5473274565" + "uri": "sbr:5433622361" } } } diff --git a/build/external_resources/yexport/resources.json b/build/external_resources/yexport/resources.json index fd61c4cd785..228624fc387 100644 --- a/build/external_resources/yexport/resources.json +++ b/build/external_resources/yexport/resources.json @@ -1,13 +1,13 @@ { "by_platform": { "darwin": { - "uri": "sbr:5473262769" + "uri": "sbr:5433593904" }, "darwin-arm64": { - "uri": "sbr:5473252351" + "uri": "sbr:5433588939" }, "linux": { - "uri": "sbr:5473257662" + "uri": "sbr:5433615972" } } } diff --git a/build/scripts/export_script_gen.py b/build/scripts/export_script_gen.py index 3df3df8638b..64b732eff5f 100644 --- a/build/scripts/export_script_gen.py +++ b/build/scripts/export_script_gen.py @@ -22,12 +22,12 @@ def parse_export_file(src): def to_c(sym): symbols = collections.deque(sym.split('::')) c_prefixes = [ # demangle prefixes for c++ symbols - '_ZN', # namespace - '_ZTIN', # typeinfo for - '_ZTSN', # typeinfo name for - '_ZTTN', # VTT for - '_ZTVN', # vtable for - '_ZNK', # const methods + '_ZN', # namespace + '_ZTIN', # typeinfo for + '_ZTSN', # typeinfo name for + '_ZTTN', # VTT for + '_ZTVN', # vtable for + '_ZNK', # const methods ] c_sym = '' while symbols: @@ -58,7 +58,7 @@ def to_gnu(src, dest): d['C'].extend(to_c(item['sym'])) else: d[item['lang']].append(item['sym']) - + if version: dest.write('{} {{\nglobal:\n'.format(version)) else: @@ -102,15 +102,9 @@ def to_darwin(src, dest): def main(): - parser = argparse.ArgumentParser( - description='Convert self-invented platform independent export file format to the format required by specific linker' - ) - parser.add_argument( - 'src', type=argparse.FileType('r', encoding='UTF-8'), help='platform independent export file path' - ) - parser.add_argument( - 'dest', type=argparse.FileType('w', encoding='UTF-8'), help='destination export file for required linker' - ) + parser = argparse.ArgumentParser(description='Convert self-invented platform independent export file format to the format required by specific linker') + parser.add_argument('src', type=argparse.FileType('r', encoding='UTF-8'), help='platform independent export file path') + parser.add_argument('dest', type=argparse.FileType('w', encoding='UTF-8'), help='destination export file for required linker') parser.add_argument('--format', help='destination file type format: gnu, msvc or darwin') args = parser.parse_args() diff --git a/build/scripts/generate_vcs_info.py b/build/scripts/generate_vcs_info.py index b311be5617d..770d2ec8026 100644 --- a/build/scripts/generate_vcs_info.py +++ b/build/scripts/generate_vcs_info.py @@ -29,19 +29,19 @@ def _get_user_locale(): return [] -class _GitVersion: +class _GitVersion(): @classmethod def parse(cls, commit_hash, author_info, summary_info, body_info, tag_info, branch_info, depth=None): - r"""Parses output of - git rev-parse HEAD - git log -1 --format='format:%an <%ae>' - git log -1 --format='format:%s' - git log -1 --grep='^git-svn-id: ' --format='format:%b' or - git log -1 --grep='^Revision: r?\d*' --format='format:%b - git describe --exact-match --tags HEAD - git describe --exact-match --all HEAD - and depth as computed by _get_git_depth - '""" + r""" Parses output of + git rev-parse HEAD + git log -1 --format='format:%an <%ae>' + git log -1 --format='format:%s' + git log -1 --grep='^git-svn-id: ' --format='format:%b' or + git log -1 --grep='^Revision: r?\d*' --format='format:%b + git describe --exact-match --tags HEAD + git describe --exact-match --all HEAD + and depth as computed by _get_git_depth + '""" info = {} info['hash'] = commit_hash @@ -91,8 +91,8 @@ class _GitVersion: hash_args = ['rev-parse', 'HEAD'] author_args = ['log', '-1', '--format=format:%an <%ae>'] summary_args = ['log', '-1', '--format=format:%s'] - svn_args = ['log', '-1', '--grep=^git-svn-id: ', '--format=format:%b'] - svn_args_alt = ['log', '-1', '--grep=^Revision: r\\?\\d*', '--format=format:%b'] + svn_args = ['log', '-1', '--grep=^git-svn-id: ', '--format=format:%b'] + svn_args_alt = ['log', '-1', '--grep=^Revision: r\\?\\d*', '--format=format:%b'] tag_args = ['describe', '--exact-match', '--tags', 'HEAD'] branch_args = ['describe', '--exact-match', '--all', 'HEAD'] @@ -163,7 +163,6 @@ class _SystemInfo: @classmethod def get_locale(cls): import codecs - for i in cls.LOCALE_LIST: if not i: continue @@ -238,7 +237,6 @@ class _SystemInfo: errcodes += ', win-error {}'.format(e.winerror) try: import ctypes - msg = six_.text_type(ctypes.FormatError(e.winerror), _SystemInfo.get_locale()).encode('utf-8') except ImportError: pass @@ -264,8 +262,7 @@ def _get_json(vcs_root): def _dump_json( - arc_root, - info, + arc_root, info, other_data=None, build_user=None, build_date=None, @@ -290,14 +287,14 @@ def _dump_json( j['DIRTY'] = info.get('dirty', '') if 'url' in info or 'svn_url' in info: - j['SVN_REVISION'] = info.get('svn_commit_revision', info.get('revision', -1)) - j['SVN_ARCROOT'] = info.get('url', info.get('svn_url', '')) - j['SVN_TIME'] = info.get('commit_date', info.get('svn_commit_date', '')) + j['SVN_REVISION'] = info.get('svn_commit_revision', info.get('revision', -1)) + j['SVN_ARCROOT'] = info.get('url', info.get('svn_url', '')) + j['SVN_TIME'] = info.get('commit_date', info.get('svn_commit_date', '')) j['BUILD_DATE'] = build_date j['BUILD_TIMESTAMP'] = build_timestamp - return json.dumps(j, sort_keys=True, indent=4, separators=(',', ': ')) + return json.dumps(j, sort_keys=True, indent=4, separators=(',', ': ')) def get_version_info(arc_root, custom_version=""): @@ -321,3 +318,4 @@ def get_version_info(arc_root, custom_version=""): if __name__ == '__main__': with open(sys.argv[1], 'w') as f: f.write(get_version_info(sys.argv[2])) + |
