add toolchain option to customize linker command that compiler should use + use correct compiler options for using mold with GCC (WIP)#4025
Conversation
…some refactoring and fixed docstring for set_variables method
efc8e8d to
ffe7a92
Compare
ffe7a92 to
3609e55
Compare
|
Based on https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/compiler-options/linking-or-linker-options/fuse-ld.html, the @rui314 Have you ever tested |
|
@boegel A few bugs have been filed to make mold work with ICC. We fixed them, and the bug reporters seemed happy, so I believe it works with ICC. But I haven't tried it myself. |
|
@rui314 Is it correct that you need to use the |
|
@boegel I don't actually know. If icc doesn't take |
Well, it accepts the option, but then silently doesn't use |
Usage to use
moldas a linker:For non-GCC compilers (Clang, Intel) and GCC 12.1, this is equivalent with adding
-fuse-ld=moldto$CFLAGSand friends.For GCC < 12.1, this is equivalent to adding
-B$EBROOTMOLD/libexec/moldto$CFLAGSand co.See also
classic way to use moldat https://github.com/rui314/mold#how-to-use.Of course this also requires that
moldis actually available, so it should be added as a build dependency (or be available system-wide).Marked as WIP because: