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:
@@ -25,11 +25,16 @@ def main():
|
||||
parser.add_argument('--names-only', dest='names_only',
|
||||
help='Output only the name of the symbol',
|
||||
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)
|
||||
args = parser.parse_args()
|
||||
if args.output is not None:
|
||||
print('Extracting symbols from %s to %s.'
|
||||
% (args.library, args.output))
|
||||
syms = extract.extract_symbols(args.library)
|
||||
if args.only_stdlib:
|
||||
syms, other_syms = util.filter_stdlib_symbols(syms)
|
||||
util.write_syms(syms, out=args.output, names_only=args.names_only)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user