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

rcc generates cpp files that are not compatible with unity builds

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.1
    • Fix Version/s: None
    • Component/s: Build tools: rcc
    • Labels:
      None
    • Platform/s:
      All

      Description

      As the Rcc creates anonymous namespace with a struct called "dummy", like :

      namespace {
      struct initializer

      { initializer() \{ QT_RCC_MANGLE_NAMESPACE(qInitResources_qrc_maclass)(); }

      ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_qrc_maclass)(); }
      } dummy;
      }

      you can't have unity builds with multiples generated _rcc.cpp files ( for now i am obliged to exclude them from unity build )

      the compilation fail "dummy struct already defined"

      can we have a similar option to have a non anonymous namespace ?

      --namespace myname

      or an option to prefix dummy structure --prefixStruct maStruct ?

      thx

       

        Attachments

        For Gerrit Dashboard: QTBUG-81900
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            sruard sylvain ruard-dumaine
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes