[PATCH] D70918: Don't call export_symbols.py with duplicate libs

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 12:00:13 PST 2019


daltenty created this revision.
daltenty added reviewers: jasonliu, stevewan.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70918

Files:
  llvm/cmake/modules/AddLLVM.cmake


Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -851,6 +851,7 @@
     # dependencies, then the dependencies of those dependencies, and so on.
     get_target_property(new_libs ${target} LINK_LIBRARIES)
     set(link_libs ${new_libs})
+    list(REMOVE_DUPLICATES new_libs)
     while(NOT "${new_libs}" STREQUAL "")
       foreach(lib ${new_libs})
         if(TARGET ${lib})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70918.231752.patch
Type: text/x-patch
Size: 510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191202/705d4a3f/attachment.bin>


More information about the llvm-commits mailing list