This is an archive of the discontinued LLVM Phabricator instance.

Don't call export_symbols.py with duplicate libs
ClosedPublic

Authored by daltenty on Dec 2 2019, 12:00 PM.

Details

Summary

export_symbols.py discards duplicate symbols, assuming they have public definitions, so if we end
up calling it with duplicate libraries we will end up with an inaccurate export list.

Diff Detail

Event Timeline

daltenty created this revision.Dec 2 2019, 12:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2019, 12:00 PM
john.brawn added inline comments.Dec 5 2019, 8:18 AM
llvm/cmake/modules/AddLLVM.cmake
854

Given that it's the static_libs list that's passed to extract_symbols.py it would make more sense to remove the duplicates from that list (i.e. after the below loop, in case the loop adds duplicates).

daltenty updated this revision to Diff 232640.Dec 6 2019, 1:31 PM
  • Move the deduplication after the loop, so we also cover the transitive dependencies
daltenty marked an inline comment as done.Dec 6 2019, 1:31 PM
This revision is now accepted and ready to land.Dec 11 2019, 10:19 AM
This revision was automatically updated to reflect the committed changes.