diff options
| author | 2019-06-30 13:29:52 +0200 | |
|---|---|---|
| committer | 2020-01-19 12:52:09 +0100 | |
| commit | f98cd210abb40e487b30952db25c97e28726dbb4 (patch) | |
| tree | cfdbfd5909003102a58c33d157e6a4cf635e1919 /src | |
| parent | Merge pull request #3317 from ReinUsesLisp/gl-decomp-cc-decomp (diff) | |
| download | yuzu-f98cd210abb40e487b30952db25c97e28726dbb4.tar.gz yuzu-f98cd210abb40e487b30952db25c97e28726dbb4.tar.xz yuzu-f98cd210abb40e487b30952db25c97e28726dbb4.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f18239edb..9d0af02fd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
| @@ -77,6 +77,15 @@ else() | |||
| 77 | add_compile_options("-static") | 77 | add_compile_options("-static") |
| 78 | endif() | 78 | endif() |
| 79 | endif() | 79 | endif() |
| 80 | |||
| 81 | if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW) | ||
| 82 | # GNU ar: Create thin archive files. | ||
| 83 | # Requires binutils-2.19 or later. | ||
| 84 | set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>") | ||
| 85 | set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>") | ||
| 86 | set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>") | ||
| 87 | set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qTP <TARGET> <LINK_FLAGS> <OBJECTS>") | ||
| 88 | endif() | ||
| 80 | endif() | 89 | endif() |
| 81 | 90 | ||
| 82 | add_subdirectory(common) | 91 | add_subdirectory(common) |