File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ else()
2222endif ()
2323
2424set (runtime_cflags
25- -std=c99 -ffunction-sections -fdata-sections
25+ -std=c99 -ffunction-sections -fdata-sections -flto
2626 -DGIT_COMMIT=\\"${GIT_COMMIT} \\"
2727 -I${squashfuse_INCLUDE_DIRS}
2828 -I${PROJECT_SOURCE_DIR} /include
2929 -I${PROJECT_SOURCE_DIR} /lib/libappimage/include
3030 -I${PROJECT_SOURCE_DIR} /lib/libappimage/src/libappimage_hashlib/include
3131 ${DEPENDENCIES_CFLAGS}
3232)
33- set (runtime_ldflags -s -Wl,--gc-sections ${DEPENDENCIES_LDFLAGS} )
33+ set (runtime_ldflags -s -Wl,--gc-sections -flto ${DEPENDENCIES_LDFLAGS} )
3434
3535if (BUILD_DEBUG)
3636 message (WARNING "Debug build, adding debug information" )
@@ -110,6 +110,7 @@ add_executable(runtime ${CMAKE_CURRENT_BINARY_DIR}/runtime.4.o notify.c)
110110# CMake gets confused by the .o object, therefore we need to tell it that it shall link everything using the C compiler
111111set_property (TARGET runtime PROPERTY LINKER_LANGUAGE C)
112112target_link_libraries (runtime PRIVATE libsquashfuse dl xz libzlib pthread libappimage_shared libappimage_hashlib)
113+ target_link_options (runtime PRIVATE ${runtime_ldflags} )
113114target_include_directories (runtime PRIVATE ${PROJECT_SOURCE_DIR} /include )
114115
115116if (BUILD_DEBUG)
You can’t perform that action at this time.
0 commit comments