mstorsjo created this revision.
Herald added a subscriber: mgorny.

In cross build setups, the ar used in merge_archives.py might not be the right 
one for the target (and the invocation doesn't include the 's' modifier for 
updating the archive index); make sure to rebuild the index for the static 
library.


https://reviews.llvm.org/D37134

Files:
  lib/CMakeLists.txt


Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -272,6 +272,8 @@
       "$<TARGET_LINKER_FILE:cxx_static>"
       "${MERGE_ARCHIVES_ABI_TARGET}"
       "${MERGE_ARCHIVES_SEARCH_PATHS}"
+    COMMAND
+      ${CMAKE_RANLIB} $<TARGET_LINKER_FILE:cxx_static>
     WORKING_DIRECTORY ${LIBCXX_BUILD_DIR}
     )
   endif()


Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -272,6 +272,8 @@
       "$<TARGET_LINKER_FILE:cxx_static>"
       "${MERGE_ARCHIVES_ABI_TARGET}"
       "${MERGE_ARCHIVES_SEARCH_PATHS}"
+    COMMAND
+      ${CMAKE_RANLIB} $<TARGET_LINKER_FILE:cxx_static>
     WORKING_DIRECTORY ${LIBCXX_BUILD_DIR}
     )
   endif()
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to