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

`config.tests/x86intrin` fails on AppleClang 14.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.4.0
    • Build System
    • None
    • macOS

    Description

      It seems that Xcode 14.1, and its toolset are more strict about defining the target. In this case of x86intrin, the tests fails because CMake hasn't specified the target arch, and as a result Apple clang version 14.0.0 (clang-1400.0.29.202) does not recognize the cannonlake arch and the compilation fails, removing the -march=cannonlake results in following error.

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/immintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
      #error "This header is only meant to be used on x86 and x64 architecture"
      ^
      

      So, I guess, from apple-clang 14, x86_64 archs are not exposed unless you set target arch to x86_64. 

      Update: I was building on an ARM Mac, with macOS Ventura 13.0, using Xcode 13, and AppleClang 14.0. I haven't set any specific target, so this was a default build on ARM, targeting ARM.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            mrmsdbdl Amir Masoud Abdol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes