Skip to content

IAR: Add response flag for files

Felipe Torrezan requested to merge felipe-iar/cmake:iar-rsp-on-objects into master

This Merge Request changes the following for the IAR Toolchains

  • Added CMAKE_${lang}_RESPONSE_FILE_FLAG.

  • CMAKE_${lang}_RESPONSE_FILE_FLAG and CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG now applies to C, CXX and ASM. Response files can now be used for building targets purely made of Assembly.

  • Code de-duplication by using the __compiler_iar_common() macro:

    • The following variables serves for both xlink and ilink (C and CXX):
      • CMAKE_${lang}_COMPILE_OBJECT,
      • CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE,
      • CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE and
      • CMAKE_${lang}_FLAGS_*_INIT
    • Response file flags (C, CXX and ASM):
      • CMAKE_${lang}_RESPONSE_FILE_FLAG
      • CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG
    • Archive Finish
      • CMAKE_${lang}_ARCHIVE_FINISH - it is the same for both linker technologies
  • Testbenches:

  • Observation related to #19213 (closed):

    • Once CMAKE_NINJA_FORCE_RESPONSE_FILE is set, CMAKE_${lang}_USE_RESPONSE_FILES_FOR_OBJECTS is automatically set.

Fixes #19213 (closed).

Edited by Felipe Torrezan

Merge request reports