mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	build: Enable link time optimization in release builds. (#6887)
This commit is contained in:
		
							parent
							
								
									edf157200d
								
							
						
					
					
						commit
						f2e0748a22
					
				
					 10 changed files with 12 additions and 8 deletions
				
			
		|  | @ -5,6 +5,10 @@ include_directories(.) | |||
| set_property(DIRECTORY APPEND PROPERTY | ||||
|     COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>) | ||||
| 
 | ||||
| if (ENABLE_LTO) | ||||
|     set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) | ||||
| endif() | ||||
| 
 | ||||
| # Set compilation flags | ||||
| if (MSVC) | ||||
|     set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE) | ||||
|  |  | |||
|  | @ -49,7 +49,6 @@ create_target_directory_groups(audio_core) | |||
| 
 | ||||
| target_link_libraries(audio_core PUBLIC citra_common citra_core) | ||||
| target_link_libraries(audio_core PRIVATE SoundTouch teakra) | ||||
| set_target_properties(audio_core PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| add_definitions(-DSOUNDTOUCH_INTEGER_SAMPLES) | ||||
| 
 | ||||
| if(ENABLE_MF) | ||||
|  |  | |||
|  | @ -167,7 +167,6 @@ create_target_directory_groups(citra_common) | |||
| 
 | ||||
| target_link_libraries(citra_common PUBLIC fmt::fmt library-headers microprofile Boost::boost Boost::serialization Boost::iostreams) | ||||
| target_link_libraries(citra_common PRIVATE libzstd_static) | ||||
| set_target_properties(citra_common PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| 
 | ||||
| if ("x86_64" IN_LIST ARCHITECTURE) | ||||
|     target_link_libraries(citra_common PRIVATE xbyak) | ||||
|  |  | |||
|  | @ -480,7 +480,6 @@ create_target_directory_groups(citra_core) | |||
| target_link_libraries(citra_core PUBLIC citra_common PRIVATE audio_core network video_core) | ||||
| target_link_libraries(citra_core PRIVATE Boost::boost Boost::serialization Boost::iostreams httplib) | ||||
| target_link_libraries(citra_core PUBLIC dds-ktx PRIVATE cryptopp fmt::fmt lodepng open_source_archives) | ||||
| set_target_properties(citra_core PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| 
 | ||||
| if (ENABLE_WEB_SERVICE) | ||||
|     target_link_libraries(citra_core PRIVATE web_service) | ||||
|  |  | |||
|  | @ -43,7 +43,6 @@ endif() | |||
| 
 | ||||
| create_target_directory_groups(input_common) | ||||
| target_link_libraries(input_common PUBLIC citra_core PRIVATE citra_common ${Boost_LIBRARIES}) | ||||
| set_target_properties(input_common PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| 
 | ||||
| if (CITRA_USE_PRECOMPILED_HEADERS) | ||||
|     target_precompile_headers(input_common PRIVATE precompiled_headers.h) | ||||
|  |  | |||
|  | @ -23,7 +23,6 @@ if (ENABLE_WEB_SERVICE) | |||
| endif() | ||||
| 
 | ||||
| target_link_libraries(network PRIVATE citra_common enet Boost::serialization httplib) | ||||
| set_target_properties(network PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| 
 | ||||
| if (CITRA_USE_PRECOMPILED_HEADERS) | ||||
|     target_precompile_headers(network PRIVATE precompiled_headers.h) | ||||
|  |  | |||
|  | @ -143,7 +143,6 @@ create_target_directory_groups(video_core) | |||
| target_link_libraries(video_core PUBLIC citra_common citra_core) | ||||
| target_link_libraries(video_core PRIVATE Boost::serialization dds-ktx json-headers nihstro-headers tsl::robin_map) | ||||
| target_link_libraries(video_core PRIVATE vulkan-headers vma glad sirit SPIRV glslang) | ||||
| set_target_properties(video_core PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| 
 | ||||
| if ("x86_64" IN_LIST ARCHITECTURE) | ||||
|     target_link_libraries(video_core PUBLIC xbyak) | ||||
|  |  | |||
|  | @ -17,7 +17,6 @@ create_target_directory_groups(web_service) | |||
| target_compile_definitions(web_service PUBLIC -DENABLE_WEB_SERVICE) | ||||
| target_link_libraries(web_service PRIVATE citra_common network json-headers httplib cpp-jwt) | ||||
| target_link_libraries(web_service PUBLIC ${OPENSSL_LIBS}) | ||||
| set_target_properties(web_service PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO}) | ||||
| if (ANDROID) | ||||
|     target_link_libraries(web_service PRIVATE ifaddrs) | ||||
| elseif(WIN32) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue