TI ARM CGT: Incorrect Ninja rule generated for static library with many object files
CMake version: cmake-3.26.3-windows-x86_64
Ninja version: 1.11.1
Toolchain: TI ARM CGT 20.2.7
I have a project where CMake generates an incorrect ninja rule for linking a C static library. This seems to only happen when the library I add in my CMakeLists.txt has many source files (185 sources in this case). CMake generates working ninja rules for other static libraries with a small number of sources added. I was able to manually modify the rules.ninja file to get a build working.
rule_1_source_working.txt rule_1_source_working.txt is the ninja rule generated for a static library I create with 1 source file added. This works fine.
rule_185_sources_original.txt rule_185_source_original.txt is the original ninja rule generated for a static library I create with 185 source files added. This does not work and when the linker runs, it provides this warning message. "warning: archive symbol directory is missing from archive"
rule_185_sources_fixed.txt rule_185_sources_fixed.txt is my modified ninja rule that properly creates the static library.
All the modification does is invoke the archiver with the RSP_FILE, and move the archiver command/options and library name to the RSP_FILE content. This follows the format of the TI description of the Archiver Command File (seen below)
Is there a way to control the format for this ninja rule using CMake files in my project, or is this a bug that will need to be fixed?