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

QMake does not set NDEBUG when targetting Android

XMLWordPrintable

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

      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!

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

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

              Created:
              Updated:

                There are no open Gerrit changes