mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-27 06:22:49 +00:00
build: Disable LTO when using MSVC. (#7003)
This commit is contained in:
parent
d19fe9aa4c
commit
d0b8974845
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
@ -145,11 +145,6 @@ jobs:
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-${{ matrix.target }}-
|
${{ runner.os }}-${{ matrix.target }}-
|
||||||
- name: Increase Pagefile size
|
|
||||||
uses: al-cheb/configure-pagefile-action@v1.2
|
|
||||||
with:
|
|
||||||
minimum-size: 2GB
|
|
||||||
maximum-size: 6GB
|
|
||||||
- name: Set up MSVC
|
- name: Set up MSVC
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
if: ${{ matrix.target == 'msvc' }}
|
if: ${{ matrix.target == 'msvc' }}
|
||||||
|
|
|
@ -46,6 +46,13 @@ else()
|
||||||
set(IS_RELEASE_BUILD ON)
|
set(IS_RELEASE_BUILD ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# LTO takes too much memory and time using MSVC.
|
||||||
|
if (NOT MSVC AND IS_RELEASE_BUILD)
|
||||||
|
set(DEFAULT_ENABLE_LTO ON)
|
||||||
|
else()
|
||||||
|
set(DEFAULT_ENABLE_LTO OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ENABLE_SDL2 "Enable using SDL2" ON)
|
option(ENABLE_SDL2 "Enable using SDL2" ON)
|
||||||
CMAKE_DEPENDENT_OPTION(ENABLE_SDL2_FRONTEND "Enable the SDL2 frontend" ON "ENABLE_SDL2;NOT ANDROID AND NOT IOS" OFF)
|
CMAKE_DEPENDENT_OPTION(ENABLE_SDL2_FRONTEND "Enable the SDL2 frontend" ON "ENABLE_SDL2;NOT ANDROID AND NOT IOS" OFF)
|
||||||
option(USE_SYSTEM_SDL2 "Use the system SDL2 lib (instead of the bundled one)" OFF)
|
option(USE_SYSTEM_SDL2 "Use the system SDL2 lib (instead of the bundled one)" OFF)
|
||||||
|
@ -75,7 +82,7 @@ CMAKE_DEPENDENT_OPTION(CITRA_ENABLE_BUNDLE_TARGET "Enable the distribution bundl
|
||||||
|
|
||||||
# Compile options
|
# Compile options
|
||||||
CMAKE_DEPENDENT_OPTION(COMPILE_WITH_DWARF "Add DWARF debugging information" ${IS_DEBUG_BUILD} "MINGW" OFF)
|
CMAKE_DEPENDENT_OPTION(COMPILE_WITH_DWARF "Add DWARF debugging information" ${IS_DEBUG_BUILD} "MINGW" OFF)
|
||||||
option(ENABLE_LTO "Enable link time optimization" ${IS_RELEASE_BUILD})
|
option(ENABLE_LTO "Enable link time optimization" ${DEFAULT_ENABLE_LTO})
|
||||||
option(CITRA_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
option(CITRA_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||||
option(CITRA_WARNINGS_AS_ERRORS "Enable warnings as errors" ON)
|
option(CITRA_WARNINGS_AS_ERRORS "Enable warnings as errors" ON)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue