【发布时间】:2016-12-07 07:42:35
【问题描述】:
我在 GNAT 中有一个项目,我想列出所有从未使用过的文件。我正在考虑用 python 脚本来做,但是,用 GNAT 可以很容易地做到这一点吗?
更新:
我发现了 gnatelim,但是虽然在帮助中它说有 -P 选项
usage: gnatelim [options] -main=main_unit_name {filename} [-cargs gcc_switches]
options:
--version - Display version and exit
--help - Display usage and exit
-Pproject - Use project file project. Only one such switch can be used.
它似乎不起作用,因为它要求一个主要单元(拥有整个项目!):
>gnatelim -Prelease.gpr
gnatelim: No main unit specified
try "gnatelim.exe --help" for more information.
我正在使用 GNAT 2015
【问题讨论】:
-
你在看§8.3 Improving Performance的大小吗?
-
我要做的是获取永远不会被删除的文件或获取大量死代码并将其删除。您发布的链接是一种可能性,但我不知道如何让它与 gpr 项目一起使用。