Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111901

Release build still puts debug info into .so files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5, 6.6
    • Build System: CMake
    • None
    • Android

    Description

      When doing a Release build, the generated .so files are 10 times bigger because they contain debug information. One needs to strip debug info from them manually to have a small library.

      Release builds should behave as their name suggest: producing releasable binaries without debug information.

      This is the general configuration which comes up in QtAA builds:

         -DCMAKE_CXX_FLAGS=-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  
         -DCMAKE_CXX_FLAGS_DEBUG=-fno-limit-debug-info 
         -DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG 
         -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG

      As it can be seen above, some part of the build system sets the -g flag globally to all build types. This happens by default without any special flags as well.

      Attachments

        Activity

          People

            qtbuildsystem Qt Build System Team
            zogera Zoltán Gera
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: