指定G ++的自定义链接程序可执行文件 [英] Specifying custom linker executable to g++

查看:81
本文介绍了指定G ++的自定义链接程序可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我们的项目上尝试LLVM链接器(lld).我们使用gcc 6,因此显然-fuse-ld=lld标志尚不可用.我不控制默认使用的ld可执行文件,因此无法用符号链接替换它.还有其他选择吗?

I would like to try the LLVM linker (lld) on our project. We use gcc 6, so apparently the -fuse-ld=lld flag is not available yet. I don't control the ld executable used by default, so I can't replace it with a symlink. Are there any other options?

我们使用的构建系统是make,链接是由编译器完成的,而不是直接调用ld.

The build system we use is make, and linking is done by the compiler, not a direct call to ld.

推荐答案

一个简单的解决方法是修改PATH环境变量以指向自定义的ld可执行文件(请参见示例

One easy workaround is to modify PATH environment variable to point to custom ld executable (see the example here).

这篇关于指定G ++的自定义链接程序可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆