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

QMake does not set NDEBUG when targetting Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.2, 5.9.0 Beta 3
    • Build tools: qmake
    • None

    Description

      Created a Qt project with this main:

      #include "QDialog"
      #include <QApplication>
      #include <assert.h>
      
      int main(int argc, char *argv[])
      {
          assert( false );
      
          QApplication a(argc, argv);
          QDialog dlg;
          dlg.show();
      
          return a.exec();
      }
      

      Compile in Debug targeting Windows (MSVC2015), it asserts on run.
      Compile in Release targeting Windows (MSVC2015), it does not assert on run.

      Compile in Debug targeting Android (armv7), it asserts on run.
      Compile in Release targetting Android (armv7), it asserts on run.

      assert must be removed in Release builds. Apparently NDEBUG is not set upon compilation.

      This is critical (assert could make Release applications crash!

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            jpo38 Jean Porcherot
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes