1
0
Fork 0

Add tool to make archives non thin; use it in target nonthinV8

This commit is contained in:
Wilfried Goesgens 2016-05-02 15:38:47 +02:00
parent 6c9c0fca67
commit 4e67ba3dd2
2 changed files with 14 additions and 0 deletions

View File

@ -464,4 +464,8 @@ if (WIN32)
install(FILES ${ICU_DT}
DESTINATION "share/arangodb/"
RENAME ${ICU_DT_DEST})
else()
add_custom_target(nonthinV8
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../../Installation/archive-de-thinner.sh ${V8_REL_TARGET_PATH}
COMMENT de-thins V8 .a files)
endif()

View File

@ -0,0 +1,10 @@
#!/bin/bash
# this shell script takes all current .ar - archives it finds.
# if they're thin (only contain references to the object files)
# it creates a new .ar - archive with the referenced objects
# and overwrites the original .a
# takes one argument: the directory to spider the .a files.
for lib in `find $1 -name '*.a'`; \
do ar -t ${lib} | xargs ar rvs ${lib}.new && mv -v ${lib}.new ${lib}; \
done