From a875b1f4c2219c2941751b44b1fc86aea9df6d6d Mon Sep 17 00:00:00 2001 From: Rye Date: Sat, 27 Sep 2025 15:25:57 -0400 Subject: [PATCH 1/2] Enable LTO in GHA builds --- build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.sh b/build.sh index 5c0a9e5288f..302185a9bf5 100755 --- a/build.sh +++ b/build.sh @@ -149,6 +149,7 @@ pre_build() RELEASE_CRASH_REPORTING=OFF HAVOK=OFF TESTING=OFF + USE_LTO=ON SIGNING=() if [[ "$variant" != *OS ]] then @@ -170,6 +171,7 @@ pre_build() # RELEASE_CRASH_REPORTING is tuned on unconditionaly, this is fine but not for Linux as of now (due to missing breakpad/crashpad support) RELEASE_CRASH_REPORTING=OFF HAVOK=OFF + USE_LTO=OFF fi if $build_tests @@ -202,6 +204,7 @@ pre_build() "$autobuild" configure --quiet -c $variant \ ${eval_autobuild_configure_parameters:---} \ -DLL_TESTS:BOOL="$TESTING" \ + -DUSE_LTO:BOOL="$USE_LTO" \ -DPACKAGE:BOOL=ON \ -DHAVOK:BOOL="$HAVOK" \ -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \ From 367b0c980697e9ea9db100856da76435d50f29cd Mon Sep 17 00:00:00 2001 From: Rye Date: Sat, 27 Sep 2025 16:40:37 -0400 Subject: [PATCH 2/2] Fix ODR violation during LTO link --- indra/llcommon/llsdutil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp index dbd89118c9c..fd014841289 100644 --- a/indra/llcommon/llsdutil.cpp +++ b/indra/llcommon/llsdutil.cpp @@ -503,7 +503,7 @@ bool filter_llsd_with_template( * Helpers for llsd_matches() *****************************************************************************/ // raw data used for LLSD::Type lookup -struct Data +struct LLSDData { LLSD::Type type; const char* name; @@ -534,7 +534,7 @@ class TypeLookup { LL_PROFILE_ZONE_SCOPED; - for (const Data *di(boost::begin(typedata)), *dend(boost::end(typedata)); di != dend; ++di) + for (const LLSDData*di(boost::begin(typedata)), *dend(boost::end(typedata)); di != dend; ++di) { mMap[di->type] = di->name; }