mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
Change sym_check to filter non-stdlib symbols.
Currently sym_check almost all names found in the binary, including those which are defined in other libraries. This makes our ABI lists harder to maintain. This patch adds a --only-stdlib-symbols option to sym_check which removes all symbols which aren't possibly provided by libc++. It also re-generates the linux ABI list after making this change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -27,6 +27,9 @@ def main():
|
||||
'--removed-only', dest='removed_only',
|
||||
help='Only print removed symbols',
|
||||
action='store_true', default=False)
|
||||
parser.add_argument('--only-stdlib-symbols', dest='only_stdlib',
|
||||
help="Filter all symbols not related to the stdlib",
|
||||
action='store_true', default=False)
|
||||
parser.add_argument(
|
||||
'-o', '--output', dest='output',
|
||||
help='The output file. stdout is used if not given',
|
||||
@@ -44,6 +47,10 @@ def main():
|
||||
old_syms_list = util.extract_or_load(args.old_syms)
|
||||
new_syms_list = util.extract_or_load(args.new_syms)
|
||||
|
||||
if args.only_stdlib:
|
||||
old_syms_list, _ = util.filter_stdlib_symbols(old_syms_list)
|
||||
new_syms_list, _ = util.filter_stdlib_symbols(new_syms_list)
|
||||
|
||||
added, removed, changed = diff.diff(old_syms_list, new_syms_list)
|
||||
if args.removed_only:
|
||||
added = {}
|
||||
|
Reference in New Issue
Block a user