mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 18:19:21 +01:00
CMake: Create thin archives on Linux
This significantly reduces unnecessary disk writes and space usage when building Citra. libcore.a is now only ~1MB rather than several hundred megabytes.
This commit is contained in:
parent
020cd56ad8
commit
72a081c617
@ -80,6 +80,15 @@ else()
|
|||||||
add_compile_options("-static")
|
add_compile_options("-static")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW)
|
||||||
|
# GNU ar: Create thin archive files.
|
||||||
|
# Requires binutils-2.19 or later.
|
||||||
|
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
|
set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
|
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
|
set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(common)
|
add_subdirectory(common)
|
||||||
|
Loading…
Reference in New Issue
Block a user