Windows-GNU: Support duplicate object names when linking shared libraries

Extend the change from commit 39d0ade07e (Windows-GNU: Support duplicate
object names in large archives (#14874), 2014-04-14, v3.1.0-rc1~629^2~1)
to apply to the temporary archive we create for linking shared libraries
with MinGW tools.

Issue: #21988
This commit is contained in:
Brad King
2021-05-03 14:28:55 -04:00
parent 4e5893b658
commit e8f0b75ff9

View File

@@ -121,7 +121,7 @@ macro(__windows_compiler_gnu lang)
CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}")
set(CMAKE_${lang}_${rule}
"<CMAKE_COMMAND> -E rm -f <OBJECT_DIR>/objects.a"
"<CMAKE_AR> cr <OBJECT_DIR>/objects.a <OBJECTS>"
"<CMAKE_AR> qc <OBJECT_DIR>/objects.a <OBJECTS>"
"${CMAKE_${lang}_${rule}}"
)
endforeach()