mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-07-12 18:03:52 +00:00
Move LTCG/LTO enablement into the build scripts
This commit is contained in:
@@ -20,21 +20,6 @@ CONFIG(release, debug|release) {
|
||||
}
|
||||
}
|
||||
|
||||
# Enable LTCG/LTO for release builds
|
||||
CONFIG(release, debug|release) {
|
||||
*-msvc {
|
||||
QMAKE_CFLAGS += /GL
|
||||
QMAKE_CXXFLAGS += /GL
|
||||
QMAKE_LFLAGS += /LTCG
|
||||
}
|
||||
|
||||
macx {
|
||||
QMAKE_CFLAGS += -flto=thin
|
||||
QMAKE_CXXFLAGS += -flto=thin
|
||||
QMAKE_LFLAGS += -flto=thin
|
||||
}
|
||||
}
|
||||
|
||||
# Enable ASan for Linux or macOS
|
||||
#CONFIG += sanitizer sanitize_address
|
||||
|
||||
|
||||
@@ -154,6 +154,11 @@ mkdir %BUILD_FOLDER%
|
||||
mkdir %INSTALLER_FOLDER%
|
||||
mkdir %SYMBOLS_FOLDER%
|
||||
|
||||
rem Enable LTCG for official builds
|
||||
set CFLAGS=/GL
|
||||
set CXXFLAGS=/GL
|
||||
set LDFLAGS=/LTCG
|
||||
|
||||
echo Configuring the project
|
||||
pushd %BUILD_FOLDER%
|
||||
%QMAKE_CMD% %SOURCE_ROOT%\moonlight-qt.pro
|
||||
|
||||
@@ -41,6 +41,11 @@ mkdir $BUILD_ROOT
|
||||
mkdir $BUILD_FOLDER
|
||||
mkdir $INSTALLER_FOLDER
|
||||
|
||||
# Enable LTO for official builds
|
||||
export CFLAGS=-flto=thin
|
||||
export CXXFLAGS=-flto=thin
|
||||
export LDFLAGS=-flto=thin
|
||||
|
||||
echo Configuring the project
|
||||
pushd $BUILD_FOLDER
|
||||
qmake $SOURCE_ROOT/moonlight-qt.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" || fail "Qmake failed!"
|
||||
|
||||
Reference in New Issue
Block a user