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

lupdate: -mno-sse not recognized if binary linked against Clang libraries built on ARM-based Mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.0
    • Tools: Linguist
    • None
    • 94d8e9ab0 (dev)

    Description

      lupdate can run in two modes. One such mode interfaces with Clang when parsing source code. This latter mode is available if lupdate is built against a set of Clang libraries. For our purposes, we link against the same set of Clang libraries that are built and provisioned for QDoc.

      During execution, lupdate passes the compiler flag `-mno-sse` if on X86 architecture. For some yet poorly understood reason, this is also required on macOS, as otherwise, Clang will complain about attemted use of an incomplete type in the system header =arm_neon.h=, an issue that propagates from =qsimd.h=. However, when the Clang libraries are compiled on an ARM-based Mac, the `-mno-sse` compiler flag isn't recognized (it's X86 specific), which causes an error.

      This has become apparent as a consequence of moving from macOS 12 x64 to macOS 12 arm64 as the platform we use to build Clang libraries for QDoc, and is now effectively blocking progress on the task to provision LLVM 19-based Clang libraries in COIN. Dropping the compiler flag surfaces the incomplete type warning from the compiler. My understanding is that, as lupdate tests parse the output from the lupdate process, changes in process output may fail a test even if lupdate is able to generate the correct translation information. This indicates that the current test design is brittle and should possibly be redone.

      Passing `-mno-sse` is arguably a workaround for something that should be solved by how lupdate interfaces with Clang. However, my understanding of the underlying issue is incomplete, and there may be reasons to disable One possible solution would be to build Qt with the same flag, but on the other hand, this works on ARM-based linux by skipping that compiler flag.

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              paulwicking Paul Wicking
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change