[build] Compress Linux debug info (#5633)

This commit is contained in:
Tyler Veness
2023-09-14 20:46:44 -07:00
committed by GitHub
parent 57b2d6f254
commit bc7f23a632
2 changed files with 12 additions and 0 deletions

View File

@@ -12,4 +12,9 @@ macro(wpilib_target_warnings target)
elseif(UNIX AND APPLE)
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-anon-enum-enum-conversion>)
endif()
# Compress debug info with GCC
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
target_compile_options(${target} PRIVATE -gz)
endif()
endmacro()

View File

@@ -43,6 +43,13 @@ nativeUtils.platformConfigs.each {
}
}
// Compress debug info on Linux
nativeUtils.platformConfigs.each {
if (it.name.contains('linux')) {
it.cppCompiler.debugArgs.add("-gz")
}
}
// NativeUtils adds the following OpenCV warning suppression for Linux, but not
// for macOS
// https://github.com/opencv/opencv/issues/20269