C++ TFS 1.x compilation - long Linking time

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
2,033
Best answers
19
Reaction score
1,089
Location
PLand
Anyone got idea why 'linking' may take 45 seconds on dedicated servers (Debian 7 and Debian 8.9)?

I tested it on 2 dedics (i4790K, 32-64GB ram, SSD NVME) and both compile files fast, but linking takes around 45 second.
After single line change in 1 file, it compiles file in 3 seconds and then I must wait 45 seconds for linker.
Tested it with g++ 4.9, 5, 6. Tested with "cotire" on/off.

At my home PC with Ubuntu 16.04 linking takes around 1 second.

After compilation on dedic, binary file size is 19MB, on home PC it's 9MB.

Any ideas what I can change in CMake project to make it link faster?
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
2,890
Best answers
64
Reaction score
400
Location
Germany
The world is going down... Gesior is asking for help!:eek:
 
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
2,033
Best answers
19
Reaction score
1,089
Location
PLand
@slawkens
Solved! :D

Someone added flags to TFS project on dedic:
PHP:
-march=native -ggdb3 -Ofast -fstack-protector -fstack-protector-all -fno-var-tracking-assignments
-flto - link-time optimizer
 
Top