Skip to content

fix(cmake): remove redundant add_definitions(${LLVM_DEFINITIONS})#3021

Draft
FIM43-Redeye wants to merge 3 commits intoXilinx:mainfrom
FIM43-Redeye:fix/gcc-compile-defs
Draft

fix(cmake): remove redundant add_definitions(${LLVM_DEFINITIONS})#3021
FIM43-Redeye wants to merge 3 commits intoXilinx:mainfrom
FIM43-Redeye:fix/gcc-compile-defs

Conversation

@FIM43-Redeye
Copy link
Copy Markdown
Contributor

@FIM43-Redeye FIM43-Redeye commented Apr 7, 2026

Summary

  • Remove redundant add_definitions(${LLVM_DEFINITIONS}) from all six CMakeLists.txt files that also include(HandleLLVMOptions)
  • HandleLLVMOptions already adds every flag individually via add_compile_definitions(), making these calls purely duplicative
  • The redundant calls caused garbled -D flags with GCC because LLVM_DEFINITIONS is a space-separated string, not a CMake list

Fixes #2965.

Test plan

  • Verified target_model, target_model_rtti, and register_database CppTests build and pass with Clang after removal
  • CI: GCC compile matrix should now pass cleanly

Generated using Claude Code.

HandleLLVMOptions already adds all LLVM compile definitions individually
via add_compile_definitions(). The add_definitions(${LLVM_DEFINITIONS})
calls were redundant and caused garbled -D flags with GCC because
LLVM_DEFINITIONS is a space-separated string, not a CMake list.

Fixes Xilinx#2965.

Generated using Claude Code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CppTests fail to build with GCC due to duplicate compile definitions

1 participant