mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 20:12:56 -04:00
test
This commit is contained in:
parent
749fb039f8
commit
09de80c4ce
@ -258,7 +258,7 @@ if [[ "-$BUILD_TYPE-" == *-static-* ]]; then
|
|||||||
export LDFLAGS="${LDFLAGS} -L/opt/static-libs/$COMPILER/lib"
|
export LDFLAGS="${LDFLAGS} -L/opt/static-libs/$COMPILER/lib"
|
||||||
if [[ "$ARCH" == "aarch64" ]]; then
|
if [[ "$ARCH" == "aarch64" ]]; then
|
||||||
# For some reason, this dependency of libunwind is not resolved on aarch64
|
# For some reason, this dependency of libunwind is not resolved on aarch64
|
||||||
export LDFLAGS="${LDFLAGS} -lz"
|
export LDFLAGS="${LDFLAGS} -lz -lgcc_eh"
|
||||||
fi
|
fi
|
||||||
CMAKE_ARGS="${CMAKE_ARGS} -DSTATIC_BUILD_DO_NOT_USE=1 -DWITH_UNIVERSAL_BINARY=1 -DWITH_FUSE_EXTRACT_BINARY=1"
|
CMAKE_ARGS="${CMAKE_ARGS} -DSTATIC_BUILD_DO_NOT_USE=1 -DWITH_UNIVERSAL_BINARY=1 -DWITH_FUSE_EXTRACT_BINARY=1"
|
||||||
if [[ "$BUILD_TYPE" != *-minimal-* ]]; then
|
if [[ "$BUILD_TYPE" != *-minimal-* ]]; then
|
||||||
|
@ -907,40 +907,6 @@ foreach(tgt ${TEST_TARGETS})
|
|||||||
target_link_libraries(${tgt} PRIVATE dwarfs_writer dwarfs_rewrite dwarfs_extractor)
|
target_link_libraries(${tgt} PRIVATE dwarfs_writer dwarfs_rewrite dwarfs_extractor)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(STATIC_BUILD_DO_NOT_USE)
|
|
||||||
# ...................................................................
|
|
||||||
# Each library name given to the NAMES option is first considered as a library
|
|
||||||
# file name and then considered with platform-specific prefixes (e.g. lib) and
|
|
||||||
# suffixes (e.g. .so).
|
|
||||||
# ...................................................................
|
|
||||||
|
|
||||||
function(IMPORT_STATIC_LIB TARGET NAME)
|
|
||||||
find_library(_TMP_LIB_LOC_${TARGET} ${NAME} NO_CACHE REQUIRED)
|
|
||||||
add_library(${TARGET} STATIC IMPORTED)
|
|
||||||
set_target_properties(${TARGET} PROPERTIES IMPORTED_LOCATION
|
|
||||||
${_TMP_LIB_LOC_${TARGET}})
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# import_static_lib(static_libdl "libdl.a")
|
|
||||||
# import_static_lib(static_libm "libm.a")
|
|
||||||
# import_static_lib(static_librt "librt.a")
|
|
||||||
|
|
||||||
foreach(tgt ${BINARY_TARGETS} ${TEST_TARGETS})
|
|
||||||
# ...................................................................
|
|
||||||
# -static-libgcc above and gcc_eh below is all together an ugly trick to
|
|
||||||
# enforce static linking
|
|
||||||
# ...................................................................
|
|
||||||
target_link_libraries(
|
|
||||||
${tgt}
|
|
||||||
PRIVATE
|
|
||||||
# static_libdl
|
|
||||||
# static_libm
|
|
||||||
# static_librt
|
|
||||||
gcc_eh
|
|
||||||
)
|
|
||||||
endforeach()
|
|
||||||
endif(STATIC_BUILD_DO_NOT_USE)
|
|
||||||
|
|
||||||
foreach(tgt ${TEST_TARGETS})
|
foreach(tgt ${TEST_TARGETS})
|
||||||
list(APPEND REALCLEAN_FILES "${tgt}[1]_include.cmake")
|
list(APPEND REALCLEAN_FILES "${tgt}[1]_include.cmake")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user