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

icx requires -mcx16 flag to compile _InterlockedCompareExchange128 on windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5.1, 6.6.0 Beta1
    • Build System
    • None
    • Microsoft Windows [Version 10.0.17134.2208]
    • Windows

    Description

      Seeing errors related to _InterlockedCompareExchange128

      C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt\winrt/base.h(5999,22): error: '_InterlockedCompareExchange128'
      

      needs target feature cx16

                  if (1 == _InterlockedCompareExchange128((int64_t*)this, 0, 0, (int64_t*)&current_value))
      

      affects qbluetoothlocaldevice.cpp qwindowscontext.cpp

      easiest work around add -mcx16 to QtInternalTargets.cmake

          target_compile_options(PlatformCommonInternal INTERFACE
              -Zc:wchar_t
              -bigobj
              -mcx16
          )
      

       

      Change win32-icc 

      QMAKE_CC                = icx
      
      C:\Program Files (x86)\Intel\oneAPI>icx --version
      Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2023.1.0 Build 20230320
      Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
      
      Intel(R) oneAPI DPC++/C++ Compiler 2023.1.0 (2023.1.0.20230320)
      Target: x86_64-pc-windows-msvc
      Thread model: posix
      InstalledDir: C:\PROGRA~2\Intel\oneAPI\compiler\latest\windows\bin-llvm
      Configuration file: C:\PROGRA~2\Intel\oneAPI\compiler\latest\windows\bin-llvm\..\bin\icx.cfg
      

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            rich Richard Fleck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes