Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
Qt for MCUs 2.4
-
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.