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

Release build still puts debug info into .so files

    XMLWordPrintable

Details

    • Android
    • 9d8a04cd1 (dev), f11418877 (6.5), a5a64671c (6.6)

    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

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mrmsdbdl Amir Masoud Abdol
              zogera Zoltán Gera
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: