Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease the binary size #884

Merged
merged 1 commit into from
Jun 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,6 @@ if (MULL_BUILD_32_BITS)
set(MULL_CXX_FLAGS "${MULL_CXX_FLAGS} -m32")
endif()

set (MULL_LINK_FLAGS "-rdynamic")
if (MULL_BUILD_32_BITS)
set(MULL_LINK_FLAGS "${MULL_LINK_FLAGS} -m32")
endif()

add_subdirectory(vendor)

set (MULL_DEFINITIONS ${LLVM_DEFINITIONS})
Expand Down
3 changes: 2 additions & 1 deletion cmake/cpack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ set (MULL_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-LLVM

set (CPACK_PACKAGE_FILE_NAME ${MULL_PACKAGE_FILE_NAME})

set (CPACK_STRIP_FILES TRUE)

include(CPack)

file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/PACKAGE_FILE_NAME ${MULL_PACKAGE_FILE_NAME})

30 changes: 0 additions & 30 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ macro(add_mull_executable)
target_link_libraries(${local_NAME} ${local_LINK_WITH} MullVersion)

set_target_properties(${local_NAME} PROPERTIES
LINK_FLAGS ${MULL_LINK_FLAGS}
COMPILE_FLAGS ${MULL_CXX_FLAGS}
)
target_include_directories(${local_NAME} PUBLIC
Expand All @@ -29,32 +28,3 @@ macro(add_mull_executable)
RUNTIME DESTINATION bin
)
endmacro()

macro(add_mull_internal_executable)
set (prefix local)
set (optionArguments )
set (singleValueArguments NAME)
set (multipleValueArguments SOURCES LINK_WITH)

cmake_parse_arguments(${prefix}
"${optionArguments}"
"${singleValueArguments}"
"${multipleValueArguments}"
${ARGN}
)

add_executable(${local_NAME} ${local_SOURCES})
target_link_libraries(${local_NAME} ${local_LINK_WITH})

set_target_properties(${local_NAME} PROPERTIES
LINK_FLAGS ${MULL_LINK_FLAGS}
COMPILE_FLAGS ${MULL_CXX_FLAGS}
)
target_include_directories(${local_NAME} PUBLIC
${MULL_INCLUDE_DIRS}
)
target_include_directories(${local_NAME} SYSTEM PRIVATE
${THIRD_PARTY_INCLUDE_DIRS}
)
endmacro()

1 change: 0 additions & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ target_include_directories(MullVersion SYSTEM PRIVATE
${THIRD_PARTY_INCLUDE_DIRS}
)
set_target_properties(MullVersion PROPERTIES
LINK_FLAGS ${MULL_LINK_FLAGS}
COMPILE_FLAGS ${MULL_CXX_FLAGS}
)
9 changes: 5 additions & 4 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,15 @@ if ("LLVM" IN_LIST LLVM_AVAILABLE_LIBS)
)
else ()
set(MULL_LLVM_LIBRARIES
LLVMSupport
LLVMOption
LLVMCoverage
LLVMProfileData
LLVMAsmParser
LLVMSupport
LLVMOption
LLVM${LLVM_NATIVE_ARCH}CodeGen
LLVM${LLVM_NATIVE_ARCH}AsmParser
LLVMCoverage
LLVMProfileData
)
endif ()

Expand All @@ -157,5 +159,4 @@ target_include_directories(mull SYSTEM PRIVATE

set_target_properties(mull PROPERTIES
COMPILE_FLAGS ${MULL_CXX_FLAGS}
LINK_FLAGS ${MULL_LINK_FLAGS}
)
)
1 change: 0 additions & 1 deletion lib/Diagnostics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ target_include_directories(Diagnostics PUBLIC ${CMAKE_SOURCE_DIR}/include)

set_target_properties(Diagnostics PROPERTIES
COMPILE_FLAGS ${MULL_CXX_FLAGS}
LINK_FLAGS ${MULL_LINK_FLAGS}
)
1 change: 0 additions & 1 deletion lib/Mutators/CXX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ target_include_directories(mull-cxx-mutators SYSTEM PRIVATE ${THIRD_PARTY_INCLUD
# TODO: replace with target_compile_options and target_link_options
set_target_properties(mull-cxx-mutators PROPERTIES
COMPILE_FLAGS ${MULL_CXX_FLAGS}
LINK_FLAGS ${MULL_LINK_FLAGS}
)
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ target_include_directories(mull-tests SYSTEM PRIVATE
)
set_target_properties(mull-tests PROPERTIES
COMPILE_FLAGS ${MULL_CXX_FLAGS}
LINK_FLAGS ${MULL_LINK_FLAGS}
)
get_property(dependencies GLOBAL PROPERTY TEST_FIXTURES_DEPENDENCIES)
add_dependencies(mull-tests ${dependencies})
Expand Down
7 changes: 3 additions & 4 deletions tools/mull-cxx-frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ add_library(mull-cxx-frontend
target_link_libraries(mull-cxx-frontend ${MULL_CXX_LLVM_LIBRARIES})

set_target_properties(mull-cxx-frontend PROPERTIES
LINK_FLAGS ${MULL_LINK_FLAGS}
COMPILE_FLAGS ${MULL_CXX_FLAGS}
)
target_include_directories(mull-cxx-frontend PRIVATE
Expand All @@ -26,9 +25,9 @@ target_include_directories(mull-cxx-frontend SYSTEM PRIVATE
${THIRD_PARTY_INCLUDE_DIRS}
)

INSTALL(TARGETS mull-cxx-frontend
RUNTIME DESTINATION lib
)
#INSTALL(TARGETS mull-cxx-frontend
# RUNTIME DESTINATION lib
#)

if (APPLE)
target_link_libraries(mull-cxx-frontend PRIVATE
Expand Down
1 change: 0 additions & 1 deletion tools/mull-cxx/mull-cxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "mull/JunkDetection/CXX/CXXJunkDetector.h"
#include "mull/Metrics/MetricsMeasure.h"
#include "mull/MutationsFinder.h"
#include "mull/Mutators/MutatorKind.h"
#include "mull/Parallelization/Tasks/LoadBitcodeFromBinaryTask.h"
#include "mull/Program/Program.h"
#include "mull/Result.h"
Expand Down