From 52c1c3d5cbe8e44a5e475ee14c8e0e03e40f4670 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 25 Dec 2024 12:45:19 -0500
Subject: [PATCH] Tweak debug info on linux

---
 .gitlab-ci.yml              |  6 +++---
 indra/cmake/00-Common.cmake | 12 ++++--------
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dd6e8a25de3..b43481de4de 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -73,7 +73,7 @@ variables:
   before_script:
     - python -m venv .venv
     - .\.venv\Scripts\Activate.ps1
-    - pip install --upgrade llbase autobuild certifi sentry-cli==2.32.1 cmake
+    - pip install --upgrade llbase autobuild certifi sentry-cli cmake
   script:
     - autobuild configure -c Release -- -DUSE_LTO="${ENABLE_LTO}" -DHAVOK_TPV="${USE_HAVOK}" -DLL_TESTS="${ENABLE_TESTS}" -DDISABLE_FATAL_WARNINGS=ON -DREVISION_FROM_VCS=FALSE
     - autobuild build -c Release --no-configure
@@ -107,7 +107,7 @@ variables:
   before_script:
     - python3 -m venv .venv
     - source .venv/bin/activate
-    - pip3 install --upgrade llbase autobuild dmgbuild certifi sentry-cli==2.32.1 cmake
+    - pip3 install --upgrade llbase autobuild dmgbuild certifi sentry-cli cmake
   script:
     - autobuild configure -c Release -- -DENABLE_SIGNING=ON -DUSE_LTO=OFF -DHAVOK_TPV=${USE_HAVOK} -DLL_TESTS="${ENABLE_TESTS}" -DDISABLE_FATAL_WARNINGS=ON -DREVISION_FROM_VCS=FALSE
     - autobuild build -c Release --no-configure
@@ -139,7 +139,7 @@ variables:
   before_script:
     - python3 -m venv .venv
     - source .venv/bin/activate
-    - pip3 install --upgrade llbase autobuild certifi sentry-cli==2.32.1 cmake ninja
+    - pip3 install --upgrade llbase autobuild certifi sentry-cli cmake ninja
   script:
     - autobuild configure -c Release -- -DUSE_LTO=OFF -DLL_TESTS="${ENABLE_TESTS}" -DDISABLE_FATAL_WARNINGS=ON -DREVISION_FROM_VCS=FALSE -DCOMPRESS_DEBUG=ON
     - autobuild build -c Release --no-configure
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 18aa2158e18..a262ba6d66a 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -56,8 +56,6 @@ if(USE_LTO)
   set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${USE_LTO})
 endif()
 
-option(COMPRESS_DEBUG "Compress debug sections on supported compilers" OFF)
-
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 set(CMAKE_C_VISIBILITY_PRESET "hidden")
 set(CMAKE_CXX_VISIBILITY_PRESET "hidden")
@@ -186,15 +184,13 @@ if (LINUX)
     -fexceptions
     -fno-math-errno
     -fno-strict-aliasing
+    -fno-omit-frame-pointer
     -fsigned-char
     -g
+    -gz
     -pthread
     )
 
-  if(COMPRESS_DEBUG)
-    add_compile_options(-gz)
-  endif()
-
   if (USE_AVX2)
     add_compile_options(-mavx2)
   elseif (USE_AVX)
@@ -221,13 +217,13 @@ if (LINUX)
   endif ()
 
   if (USE_ASAN OR USE_LEAKSAN OR USE_UBSAN OR USE_THDSAN)
-    add_compile_options(-Og -fno-omit-frame-pointer)
+    add_compile_options(-Og)
   else ()
     add_compile_options(-O3)
   endif ()
 
   # Enable these flags so we have a read only GOT and some linking opts
-  add_link_options("LINKER:-z,relro" "LINKER:-z,now" "LINKER:--as-needed" "LINKER:--build-id")
+  add_link_options("LINKER:-z,relro" "LINKER:-z,now" "LINKER:--as-needed" "LINKER:--build-id=sha1")
 endif ()
 
 if (DARWIN)
-- 
GitLab