This is an archive of the discontinued LLVM Phabricator instance.

Add symbol checking script to libc++ to help manage exported symbols.
ClosedPublic

Authored by EricWF on Aug 17 2014, 1:50 PM.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 12593.Aug 17 2014, 1:50 PM
EricWF retitled this revision from to Add symbol checking script to libc++ to detect ABI changes..
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: mclow.lists, danalbert.
EricWF added a subscriber: Unknown Object (MLST).

Ping. It would be really nice to get this in the trunk. I've discovered that the shared library more symbols when building in debug mode compared to release. I would like to get this in before I start working on that problem.

majnemer added inline comments.
util/sym_check/sym_check/extract.py
56 ↗(On Diff #12593)

IMO, it would be nice if this worked with llvm-nm.

That can definitively be supported. Initial investigation shows that llvm-nm has a different POSIX output format compared to nm on linux and mac, but all of the same information is there.
llvm-nm also outputs about 1200 more symbols that in any of my current baselines. I'll get it working tonight.

Thanks for looking at this.

EricWF updated this revision to Diff 13149.Sep 1 2014, 7:54 PM

Alright, I added support for llvm-nm. Since llvm-nm's posix output is broken it uses the BSD format and adds the size field.
I also changed the size field to be extracted as an integer as opposed to a string to deal with the leading zeros. I reformatted all of the baselines to reflect this.

EricWF updated this revision to Diff 14979.Oct 15 2014, 9:07 PM

I fixed the way that the check-libcxx-symbols rule is generated when no ABI library is passed to CMake on Apple. In this case it passes "libcxxabi" to sym_check as the ABI library.

EricWF updated this revision to Diff 20328.Feb 19 2015, 12:07 PM
EricWF updated this object.

Ping. I've removed all functionality relating to generating and checking baseline symbol lists. Now the scripts only extract and diff symbol lists.

EricWF updated this revision to Diff 20348.Feb 19 2015, 3:20 PM

More cleanup. Also allow the user to choose between nm and llvm-nm

EricWF updated this revision to Diff 22375.Mar 20 2015, 2:20 PM
EricWF retitled this revision from Add symbol checking script to libc++ to detect ABI changes. to Add symbol checking script to libc++ to help manage exported symbols..
EricWF accepted this revision.Mar 20 2015, 3:08 PM
EricWF added a reviewer: EricWF.

Approving. This can be reviewed post-commit.

This revision is now accepted and ready to land.Mar 20 2015, 3:08 PM
EricWF closed this revision.Mar 20 2015, 3:11 PM