[Cmake-commits] [cmake-commits] king committed cmMakefileTargetGenerator.cxx 1.107 1.108
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Oct 15 10:21:23 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv1929/Source
Modified Files:
cmMakefileTargetGenerator.cxx
Log Message:
ENH: Support object lists longer than 128K on MSVC
We use response files to list object files for the MSVC linker. The
linker complains if any response file is greater than 128K, so we split
the object file lists into multiple response files.
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.107
retrieving revision 1.108
diff -C 2 -d -r1.107 -r1.108
*** cmMakefileTargetGenerator.cxx 15 Oct 2008 14:21:14 -0000 1.107
--- cmMakefileTargetGenerator.cxx 15 Oct 2008 14:21:21 -0000 1.108
***************
*** 1635,1646 ****
if(useResponseFile)
{
! std::string objects;
! this->WriteObjectsString(objects);
! std::string objects_rsp =
! this->CreateResponseFile("objects.rsp", objects, makefile_depends);
! buildObjs = "@";
! buildObjs += this->Convert(objects_rsp.c_str(),
! cmLocalGenerator::NONE,
! cmLocalGenerator::SHELL);
}
else if(useLinkScript)
--- 1635,1667 ----
if(useResponseFile)
{
! // MSVC response files cannot exceed 128K.
! std::string::size_type const responseFileLimit = 131000;
!
! // Construct the individual object list strings.
! std::vector<std::string> object_strings;
! this->WriteObjectsStrings(object_strings, responseFileLimit);
!
! // Write a response file for each string.
! const char* sep = "";
! for(unsigned int i = 0; i < object_strings.size(); ++i)
! {
! // Number the response files.
! char rsp[32];
! sprintf(rsp, "objects%u.rsp", i+1);
!
! // Create this response file.
! std::string objects_rsp =
! this->CreateResponseFile(rsp, object_strings[i], makefile_depends);
!
! // Separate from previous response file references.
! buildObjs += sep;
! sep = " ";
!
! // Reference the response file.
! buildObjs += "@";
! buildObjs += this->Convert(objects_rsp.c_str(),
! cmLocalGenerator::NONE,
! cmLocalGenerator::SHELL);
! }
}
else if(useLinkScript)
More information about the Cmake-commits
mailing list