[Qt-creator] How to override clangtools target triplet and how to exlude unknown compiler flags?

Richard Weickelt richard at weickelt.de
Wed Jan 14 13:24:46 CET 2026


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.

When setting up the compiler, QtCreator fails to identify the ABI 
properties, but overriding them in the compiler setup in QtCreator has 
absolutely no effect.

The legacy code model works, but is not accurate enough.

How can I exclude certain compiler flags per project and how to fix the 
target triplet error?

Thanks



More information about the Qt-creator mailing list