MantisBT - CMake
View Issue Details
0015466CMakeCMakepublic2015-03-21 07:332015-11-02 09:13
Benjamin Schindler 
 
normalminoralways
closedno change required 
amd64gentoo linux3.17
CMake 3.1 
 
0015466: ninja does not use requested linker
In a project, I set CMAKE_LINKER to /usr/bin/ld.gold. Yet, when I build my project, the link step uses /usr/bin/c++ to link the project.
No tags attached.
Issue History
2015-03-21 07:33Benjamin SchindlerNew Issue
2015-03-23 09:44Brad KingNote Added: 0038276
2015-03-23 09:44Brad KingStatusnew => resolved
2015-03-23 09:44Brad KingResolutionopen => no change required
2015-11-02 09:13Robert MaynardNote Added: 0039742
2015-11-02 09:13Robert MaynardStatusresolved => closed

Notes
(0038276)
Brad King   
2015-03-23 09:44   
This is behaving as intended. The CMAKE_LINKER variable is an implementation detail and is not documented publicly.

We always drive linking through the compiler front-end so that it can add whatever runtime libraries the language needs. If you want to change what linker the compiler invokes underneath then you need to pass an appropriate flag to that compiler.

I haven't tested this but you could try editing your CMAKE_EXE_LINKER_FLAGS to add "-fuse-ld=gold".
(0039742)
Robert Maynard   
2015-11-02 09:13   
Closing resolved issues that have not been updated in more than 4 months.