Linux -fprofile arcs链接器选项是什么意思?

Linux -fprofile arcs链接器选项是什么意思?,linux,gcc,linker,Linux,Gcc,Linker,我希望在我的应用程序中包含代码Coverage,因此在premake.lua中添加了以下内容: if options["coverage"] then tinsert(package.buildoptions, {"-fprofile-arcs", "-ftest-coverage"}) tinsert(package.links, "gcov") end 然后我运行了以下命令: premake --coverage --target gnu ; make 直到我添加了以下

我希望在我的应用程序中包含代码Coverage,因此在
premake.lua
中添加了以下内容:

if options["coverage"] then
    tinsert(package.buildoptions, {"-fprofile-arcs", "-ftest-coverage"})
    tinsert(package.links, "gcov") 
end
然后我运行了以下命令:

premake --coverage --target gnu ; make
直到我添加了以下内容后,这才起作用:

 if options["coverage"] then
    tinsert(package.buildoptions, {"-fprofile-arcs", "-ftest-coverage"})
    tinsert(package.linkoptions, {"-fprofile-arcs"})
    tinsert(package.links, "gcov")
 end

这是互联网上提出的解决方案。我的问题是,我在这个
-fprofile arcs
链接器标志上找到了0个文档。。。它有什么作用?记录在哪里

此选项不提供给链接器。它由编译器驱动程序(gcc,g++)解释

编译时,此选项仅传递给编译器(cc1、cc1plus)


链接时,选项的作用是编译器驱动程序只在链接器命令行中包含
-lgcov

如果搜索查询以
-
开头,则无论在链接器命令行中以其他可能的方式获取
-lgcov
,在Google中都找不到任何内容,
-fprofile arcs
仅在调用编译器驱动程序进行链接时执行此操作。