R
Ram Shriram
My C++ project takes 45-60 minutes for linking, with link.exe taking up 100%
of the CPU.
I am using:
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft Visual C++ 2005 77626-009-0000007-41789
Microsoft Visual C++ 2005
The same code links with gcc and SunStudio compilers in less than 30
seconds.
I have enabled incremental linking for the project.
Here is the link time log:
Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Creating library C:\Ram\prj\prj.lib and object C:\Ram\prj\prj.exp
LibDef: Total time = 0.000s
Generating code
Finished generating code
OptRef: Total time = 0.000s
OptIcf: Total time = 0.063s
Pass 1: Interval #1, time = 1548.766s
Pass 2: Interval #2, time = 3.640s
Final: Total time = 1552.406s
Embedding manifest...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Creating library C:\Ram\prj\prj.lib and object C:\Ram\prj\prj.exp
LibDef: Total time = 0.016s
Generating code
Finished generating code
OptRef: Total time = 0.000s
OptIcf: Total time = 0.047s
Pass 1: Interval #1, time = 2013.203s
Pass 2: Interval #2, time = 1.297s
Final: Total time = 2014.500s
I do know which piece of code is triggering it - I am allocating a 20,000
byte buffer on the stack in a particular function:
void function() {
...
BYTE ba[] = { (BYTE) 0x11, (BYTE) 0x42, ... ... ... };
...
}
If I #ifdef this code out, the link times return to less than a minute.
Any suggestions ?
Thanks,
RS
of the CPU.
I am using:
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft Visual C++ 2005 77626-009-0000007-41789
Microsoft Visual C++ 2005
The same code links with gcc and SunStudio compilers in less than 30
seconds.
I have enabled incremental linking for the project.
Here is the link time log:
Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Creating library C:\Ram\prj\prj.lib and object C:\Ram\prj\prj.exp
LibDef: Total time = 0.000s
Generating code
Finished generating code
OptRef: Total time = 0.000s
OptIcf: Total time = 0.063s
Pass 1: Interval #1, time = 1548.766s
Pass 2: Interval #2, time = 3.640s
Final: Total time = 1552.406s
Embedding manifest...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Creating library C:\Ram\prj\prj.lib and object C:\Ram\prj\prj.exp
LibDef: Total time = 0.016s
Generating code
Finished generating code
OptRef: Total time = 0.000s
OptIcf: Total time = 0.047s
Pass 1: Interval #1, time = 2013.203s
Pass 2: Interval #2, time = 1.297s
Final: Total time = 2014.500s
I do know which piece of code is triggering it - I am allocating a 20,000
byte buffer on the stack in a particular function:
void function() {
...
BYTE ba[] = { (BYTE) 0x11, (BYTE) 0x42, ... ... ... };
...
}
If I #ifdef this code out, the link times return to less than a minute.
Any suggestions ?
Thanks,
RS