Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-163

clangd error when opening project using GCC compiler in Qt Creator

    XMLWordPrintable

Details

    • d06df3b54 (11.0)

    Description

      Qt Creator gives a clangd error when opening a Qt for MCUs project using GCC toolchain. The error is:
      C:\Qt\QtMCUs\2.4.0\demos\automotive\src\platform\baremetal\main.cpp:1: error: Unsupported argument '1' to option '-flto='

      Issue reproduces with cmake 3.24.2 (shipped with Qt) but not when using older cmake version 3.21.1

      Comparing the builds, cmake 3.24.2 adds -flto=1 (not necessarily default parameter) when 3.21.1 adds -flto flag (which would be expected). Allegedly this is a cmake bug but should be worked around or at least documented in the documentation.

      Project seems to build without errors.

      Way to reproduce:

      Having cmake 3.24.2, open Qt for MCUs automotive demo with Qt for MCUs 2.4.0 kit using arm gcc toolchain. (for example MIMXRT 1060 baremetal (armgcc)). After configure the error is visible in the main.cpp editor and in the Issues view.

      Attachments

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

        Activity

          People

            semlanik Alexey Edelev
            foxxx Tuukka Kettunen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes