Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39157

BUILD_TYPE=mysql_release to remove compile flags

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11
    • 10.11, 11.8
    • Compiling
    • None

    Description

      In cmake/build_configurations/mysql_release.cmake, triggered by BUILD_TYPE=mysql_release there a bunch of compiler flags set. There are maintained only when something breaks.

      Currently the CMAKE_BUILD_TYPE=RelWithDeb info is extensively tested on what its default compile/warning flags are.

      The BUILD_TYPE=mysql_release adds a bunch of O3 C/CXX_FLAGS along with -fno-strict-aliasing (MDEV-20277) and others.

      The BUILD_TYPE=mysql_release is tested with the following BB builders:

      • rpm-autobake / deb-autobake (by virtue of debian/control)
      • bintar
      • x86-debian-12-fulltest / amd64-ubuntu-2204-fulltest (f_fulltest)
      • windows_msi (not relevant, cflags only changed under UNIX)

      We don't have enough build resources to do CMAKE_BUILD_TYPE=RelWithDeb info and a CMAKE_BUILD_TYPE=mysql_release..

      As extensive tests are not run on autobake or bintars there is only two builders or specific architectures and compiler versions than actually perform reasonable testing for BUILD_TYPE=mysql_release. So the rest of our releases are getting released on under tested code.

      Issues like MDEV-39148 discover hidden differences in BUILD_TYPE=mysql_release.

      As such, lets remove all the "# Compiler options
      IF(UNIX)" onwards in the cmake/build_configurations/mysql_release.cmake and if there's a benefit and stability to O3, lets put it near the other compile/warning customisation in cmake/maintainer.cmake.

      For reference the default cmake cflags under Linux:

      CMakeCache.txt:// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel
      CMakeCache.txt:CMAKE_C_FLAGS:STRING=
      CMakeCache.txt:CMAKE_C_FLAGS_DEBUG:STRING=-g
      CMakeCache.txt:CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
      CMakeCache.txt:CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
      CMakeCache.txt:CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.