Skip to content

Refactor project variables

Tristan Van Berkom requested to merge tristan/refactor-project-variables into master

This branch refactors the variables section of project.conf such that:

  • C/C++ flags can be specified on a per element basis (separately)
  • C/C++ flags can also be specified on a per element basis for the definition of the "build" flags (also separately, C++ vs C flags)
  • Base common C/C++ flags which can be specified for both C and C++ compilers are still declared as 'flags' variables, to avoid duplication of these declarations
    • This means the few places where you still see variables named %{*_flags}, these are flags which are used in both cflags and cxxflags final declarations
  • The final set of build and target C/C++ flags are built out entirely in the project.conf variables section
    • This removes the need for verbose arch conditional statements in various files
    • Now instead, one can just refer to build_cflags and target_cflags and know that they contain any architecture specific flags already
    • As such, conditionals have been removed from the project.conf environment section.
  • Similar to compiler flags, there is now a local_ldflags which can be specified on a per element basis

This is a follow up from the conversation which took place in !1421 (merged)

Edited by Tristan Van Berkom

Merge request reports