mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 00:48:30 +00:00
Add visible LTO indicator, and --lto build flag
Signed-off-by: PanteraPolnocy <panterapolnocy@gmail.com>
This commit is contained in:
@@ -117,6 +117,14 @@ endif (USE_AVX_OPTIMIZATION)
|
|||||||
|
|
||||||
add_subdirectory(cmake)
|
add_subdirectory(cmake)
|
||||||
|
|
||||||
|
# <FS:PP> LTO indicator
|
||||||
|
if (USE_LTO)
|
||||||
|
message(STATUS "Compiling with Link Time Optimization")
|
||||||
|
else (USE_LTO)
|
||||||
|
message(STATUS "Compiling without Link Time Optimization")
|
||||||
|
endif (USE_LTO)
|
||||||
|
# </FS:PP> LTO indicator
|
||||||
|
|
||||||
# <FS:Beq> Tracy Profiler support
|
# <FS:Beq> Tracy Profiler support
|
||||||
if (USE_TRACY)
|
if (USE_TRACY)
|
||||||
message(STATUS "Compiling with Tracy profiler")
|
message(STATUS "Compiling with Tracy profiler")
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ endif()
|
|||||||
set(USE_LTO OFF CACHE BOOL "Enable Link Time Optimization")
|
set(USE_LTO OFF CACHE BOOL "Enable Link Time Optimization")
|
||||||
if(USE_LTO)
|
if(USE_LTO)
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
||||||
|
add_compile_definitions(USE_LTO) # <FS:PP> LTO indicator
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Don't bother with a MinSizeRel or Debug builds.
|
# Don't bother with a MinSizeRel or Debug builds.
|
||||||
|
|||||||
@@ -3976,6 +3976,12 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||||||
info["SIMD"] = "SSE2";
|
info["SIMD"] = "SSE2";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// <FS:PP> LTO indicator
|
||||||
|
#ifdef USE_LTO
|
||||||
|
info["SIMD"] = info["SIMD"].asString() + "-LTO";
|
||||||
|
#endif
|
||||||
|
// </FS:PP>
|
||||||
|
|
||||||
// <FS:CR> FIRE-8273: Add Open-sim indicator to About floater
|
// <FS:CR> FIRE-8273: Add Open-sim indicator to About floater
|
||||||
#if defined OPENSIM
|
#if defined OPENSIM
|
||||||
info["BUILD_TYPE"] = LLTrans::getString("FSWithOpensim");
|
info["BUILD_TYPE"] = LLTrans::getString("FSWithOpensim");
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ WANTS_AVX=$FALSE
|
|||||||
WANTS_AVX2=$FALSE
|
WANTS_AVX2=$FALSE
|
||||||
WANTS_TESTBUILD=$FALSE
|
WANTS_TESTBUILD=$FALSE
|
||||||
WANTS_TRACY=$FALSE
|
WANTS_TRACY=$FALSE
|
||||||
|
WANTS_LTO=$FALSE
|
||||||
WANTS_BUILD=$FALSE
|
WANTS_BUILD=$FALSE
|
||||||
WANTS_CRASHREPORTING=$FALSE
|
WANTS_CRASHREPORTING=$FALSE
|
||||||
WANTS_CACHE=$FALSE
|
WANTS_CACHE=$FALSE
|
||||||
@@ -85,6 +86,7 @@ showUsage()
|
|||||||
echo " --avx : Build with Advanced Vector Extensions"
|
echo " --avx : Build with Advanced Vector Extensions"
|
||||||
echo " --avx2 : Build with Advanced Vector Extensions 2"
|
echo " --avx2 : Build with Advanced Vector Extensions 2"
|
||||||
echo " --tracy : Build with Tracy Profiler support"
|
echo " --tracy : Build with Tracy Profiler support"
|
||||||
|
echo " --lto : Build with Link Time Optimization"
|
||||||
echo " --crashreporting : Build with crash reporting enabled (Windows only)"
|
echo " --crashreporting : Build with crash reporting enabled (Windows only)"
|
||||||
echo " --testbuild <days> : Create time-limited test build (build date + <days>)"
|
echo " --testbuild <days> : Create time-limited test build (build date + <days>)"
|
||||||
echo " --platform <platform> : Build for specified platform (darwin | windows | linux)"
|
echo " --platform <platform> : Build for specified platform (darwin | windows | linux)"
|
||||||
@@ -101,7 +103,7 @@ getArgs()
|
|||||||
# $* = the options passed in from main
|
# $* = the options passed in from main
|
||||||
{
|
{
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
while getoptex "clean build config version package velopack no-package fmodstudio openal ninja vscode compiler-cache jobs: platform: kdu opensim no-opensim singlegrid: havok avx avx2 tracy crashreporting testbuild: help chan: btype:" "$@" ; do
|
while getoptex "clean build config version package velopack no-package fmodstudio openal ninja vscode compiler-cache jobs: platform: kdu opensim no-opensim singlegrid: havok avx avx2 tracy lto crashreporting testbuild: help chan: btype:" "$@" ; do
|
||||||
|
|
||||||
#ensure options are valid
|
#ensure options are valid
|
||||||
if [ -z "$OPTOPT" ] ; then
|
if [ -z "$OPTOPT" ] ; then
|
||||||
@@ -132,6 +134,7 @@ getArgs()
|
|||||||
avx) WANTS_AVX=$TRUE;;
|
avx) WANTS_AVX=$TRUE;;
|
||||||
avx2) WANTS_AVX2=$TRUE;;
|
avx2) WANTS_AVX2=$TRUE;;
|
||||||
tracy) WANTS_TRACY=$TRUE;;
|
tracy) WANTS_TRACY=$TRUE;;
|
||||||
|
lto) WANTS_LTO=$TRUE;;
|
||||||
crashreporting) WANTS_CRASHREPORTING=$TRUE;;
|
crashreporting) WANTS_CRASHREPORTING=$TRUE;;
|
||||||
testbuild) WANTS_TESTBUILD=$TRUE
|
testbuild) WANTS_TESTBUILD=$TRUE
|
||||||
TESTBUILD_PERIOD="$OPTARG"
|
TESTBUILD_PERIOD="$OPTARG"
|
||||||
@@ -326,6 +329,7 @@ echo -e " HAVOK: `b2a $WANTS_HAVOK`" |
|
|||||||
echo -e " AVX: `b2a $WANTS_AVX`" | tee -a "$LOG"
|
echo -e " AVX: `b2a $WANTS_AVX`" | tee -a "$LOG"
|
||||||
echo -e " AVX2: `b2a $WANTS_AVX2`" | tee -a "$LOG"
|
echo -e " AVX2: `b2a $WANTS_AVX2`" | tee -a "$LOG"
|
||||||
echo -e " TRACY: `b2a $WANTS_TRACY`" | tee -a "$LOG"
|
echo -e " TRACY: `b2a $WANTS_TRACY`" | tee -a "$LOG"
|
||||||
|
echo -e " LTO: `b2a $WANTS_LTO`" | tee -a "$LOG"
|
||||||
echo -e " CRASHREPORTING: `b2a $WANTS_CRASHREPORTING`" | tee -a "$LOG"
|
echo -e " CRASHREPORTING: `b2a $WANTS_CRASHREPORTING`" | tee -a "$LOG"
|
||||||
if [ $WANTS_TESTBUILD -eq $TRUE ] ; then
|
if [ $WANTS_TESTBUILD -eq $TRUE ] ; then
|
||||||
echo -e " TESTBUILD: `b2a $WANTS_TESTBUILD` ($TESTBUILD_PERIOD days)" | tee -a "$LOG"
|
echo -e " TESTBUILD: `b2a $WANTS_TESTBUILD` ($TESTBUILD_PERIOD days)" | tee -a "$LOG"
|
||||||
@@ -497,7 +501,12 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then
|
|||||||
TRACY_PROFILER="-DUSE_TRACY:BOOL=ON"
|
TRACY_PROFILER="-DUSE_TRACY:BOOL=ON"
|
||||||
else
|
else
|
||||||
TRACY_PROFILER="-DUSE_TRACY:BOOL=OFF"
|
TRACY_PROFILER="-DUSE_TRACY:BOOL=OFF"
|
||||||
fi
|
fi
|
||||||
|
if [ $WANTS_LTO -eq $TRUE ] ; then
|
||||||
|
LTO="-DUSE_LTO:BOOL=ON"
|
||||||
|
else
|
||||||
|
LTO="-DUSE_LTO:BOOL=OFF"
|
||||||
|
fi
|
||||||
if [ $WANTS_TESTBUILD -eq $TRUE ] ; then
|
if [ $WANTS_TESTBUILD -eq $TRUE ] ; then
|
||||||
TESTBUILD="-DTESTBUILD:BOOL=ON -DTESTBUILDPERIOD:STRING=$TESTBUILD_PERIOD"
|
TESTBUILD="-DTESTBUILD:BOOL=ON -DTESTBUILDPERIOD:STRING=$TESTBUILD_PERIOD"
|
||||||
else
|
else
|
||||||
@@ -597,7 +606,7 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake -G "$TARGET" $CMAKE_ARCH ../indra $CHANNEL ${GITHASH} $FMODSTUDIO $OPENAL $KDU $OPENSIM $SINGLEGRID $HAVOK $AVX_OPTIMIZATION $AVX2_OPTIMIZATION $TRACY_PROFILER $TESTBUILD $PACKAGE $VELOPACK \
|
cmake -G "$TARGET" $CMAKE_ARCH ../indra $CHANNEL ${GITHASH} $FMODSTUDIO $OPENAL $KDU $OPENSIM $SINGLEGRID $HAVOK $AVX_OPTIMIZATION $AVX2_OPTIMIZATION $TRACY_PROFILER $LTO $TESTBUILD $PACKAGE $VELOPACK \
|
||||||
$UNATTENDED -DLL_TESTS:BOOL=OFF -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE $CACHE_OPT \
|
$UNATTENDED -DLL_TESTS:BOOL=OFF -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DCMAKE_BUILD_TYPE:STRING=$BTYPE $CACHE_OPT \
|
||||||
$CRASH_REPORTING -DVIEWER_SYMBOL_FILE:STRING="${VIEWER_SYMBOL_FILE:-}" $LL_ARGS_PASSTHRU ${VSCODE_FLAGS:-} | tee "$LOG"
|
$CRASH_REPORTING -DVIEWER_SYMBOL_FILE:STRING="${VIEWER_SYMBOL_FILE:-}" $LL_ARGS_PASSTHRU ${VSCODE_FLAGS:-} | tee "$LOG"
|
||||||
configure_status=${PIPESTATUS[0]}
|
configure_status=${PIPESTATUS[0]}
|
||||||
|
|||||||
Reference in New Issue
Block a user