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

Christian Kandeler christian.kandeler at qt.io
Thu Jan 15 12:10:41 CET 2026


On 1/14/26 5:13 PM, Richard Weickelt wrote:
> CompileFlags:
>   Remove: [-G1024, -membedded]
>
> Putting above 2 lines into the config.yaml created by QtCreator under 
> $HOME/.config/clangd/ has no effect either.
This works for me. Are you sure you restarted clangd? Have you verified 
that the server log still includes these flags on the compiler command 
line?
>> Did you try the "override for code model" option?
>
> Overriding the value with something that should work, like 
> arm-none-eabi, has no effect. The log prints still
>
> error: unknown target triple 'ba-unknown-unknown-elf' 
> [clang-diagnostic-error]
I cannot reproduce this either. Using that option should definitely put 
the value into the compile_commands.json file. Have you tried closing 
and re-opening the project?


Christian



More information about the Qt-creator mailing list