[Qt-creator] How to override clangtools target triplet and how to exlude unknown compiler flags?
Christian Kandeler
christian.kandeler at qt.io
Wed Jan 14 14:25:25 CET 2026
On 1/14/26 1:24 PM, Richard Weickelt wrote:
> In a QtCreator project I am using a GCC toolchain for an exotic CPU
> architecture. The clangd code models fails to parse the source files.
> I get:
>
> LanguageClient clangd for MyProject (MyKit), Minimum Size Release):
> Error -32001: invalid AST
>
> Looking further into the log, I find:
>
> 13:10:43.981 qtc.clangtools.runner: Output:
> error: unknown target triple 'ba-none-unknown-elf'
> [clang-diagnostic-error]
>
> The log reported more compiler flag errors which I got rid of by the
> environment variable QTC_CLANG_CMD_OPTIONS_BLACKLIST. That's a
> terrible solution though. Specifying compiler flags to be ignored in a
> .clangd file did not work although the QtCreator GUI indicates that
> .clangd files are supported.
If your build dir is not inside the source dir, I suppose clangd will
not find the .clangd file, as its project root is the
compile_commands.json file. Try using the general config.yaml and
constraining it to your project e.g. via wildcards.
> When setting up the compiler, QtCreator fails to identify the ABI
> properties,
Meaning what exactly?`
> but overriding them in the compiler setup in QtCreator has absolutely
> no effect.
Did you try the "override for code model" option?
Christian
More information about the Qt-creator
mailing list