Mingw x64 Windows:处理lto对象所需的插件 [英] Mingw x64 Windows: plugin needed to handle lto object

查看:367
本文介绍了Mingw x64 Windows:处理lto对象所需的插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用64位mingw(x86_64-5.1.0-posix-seh-rt_v4-rev0)编译我的项目时,出现消息:

When I'm trying to compile my project with 64-bit mingw (x86_64-5.1.0-posix-seh-rt_v4-rev0) I got messages:

BFD: my/project/dir/filename.cpp.obj: plugin needed to handle lto object

每个源文件的

.但是,当我使用32位mingw(i686-5.1.0-posix-dwarf-rt_v4-rev0)进行编译时,一切正常.

for each source file. Yet when I compile with 32-bit mingw(i686-5.1.0-posix-dwarf-rt_v4-rev0), everething is OK.

我的标志是:

CXX_FLAGS "-fno-exceptions -fno-rtti -std=c++14 -O3 -fstrict-aliasing -flto -fomit-frame-pointer -march=native -ffast-math -funroll-loops"
LINKER_FLAGS "-O1 -s"

我试图添加-fuse-linker-plugin和-fno-use-linker-plugin,但这没有帮助. 我的操作系统是64位Windows10.如果不重要,我会使用CLion和CMake,尽管不应该. 我该如何解决?

I tried to add -fuse-linker-plugin and -fno-use-linker-plugin, but it didn't help. My OS is 64-bit Windows 10. I use CLion and CMake if it matters, though it shouldn't. How can I fix it?

推荐答案

将LTO插件放入bfd-plugins目录:

Put the LTO plugin into the bfd-plugins directory:

mkdir mingw64\lib\bfd-plugins
cp mingw64\libexec\gcc\x86_64-w64-mingw32\5.1.0\liblto_plugin-0.dll mingw64\lib\bfd-plugins\liblto_plugin-0.dll

这篇关于Mingw x64 Windows:处理lto对象所需的插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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