在独立make中应用incredibuild

Posted on 2010-11-09 17:44  Jerry Ren  阅读(2526)  评论(1编辑  收藏  举报

    前些日子同事抱怨说,经常一个晚上要出好多个版本,每个版本编译一遍都是大把的时间。于是联想到MTK环境编译必备分布式编译工具——incredibuild,早就听说该工具除了整合visual studio之外,在make环境下也能正常工作。于是决定研究下,把我们的make工程改成能用incredibuild编译。
上google一通搜索,大体了解到主要是使用XGConsole来配合make进行分布式编译,其基本的流程如下:
首先,需要创建一个xml类型的profile作为参数,告诉XGConsole哪些命令可以用于远程调用,一般使用ADS的profile如下:

profile.xml
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Profile FormatVersion="1">
<Tools>
<Tool Filename="perl" AllowRemote="true" />
<Tool Filename="make" AllowIntercept="true" />
<Tool Filename="tcc" AllowRemote="true" />
<Tool Filename="tcpp" AllowRemote="true" />
<Tool Filename="armasm" AllowRemote="true" />
<Tool Filename="armcc" AllowRemote="true" />
<Tool Filename="armcpp" AllowRemote="true" />
<Tool Filename="strcmpex" AllowRemote="true" />
<Tool Filename="warp" AllowRemote="true" />
<Tool Filename="armar" AllowRemote="false" />
<Tool Filename="fromelf" AllowRemote="false" />
</Tools>
</Profile>

    将以上内容保存成XGConsole.xml,名字其实可以随意。
然后,把所有的make命令中添加参数-j [N],表示允许并行编译,N表示最大需要的并行的数目,我一般是-j 9。类似这样:
make -j 9 -f hellworld.mak


最后,使用命令


XGConsole /command=“make -j 9 -f helloworld.mak” /profile=”XGConsole.xml”


来启动XGConsole来执行分布式编译。

但是也遇到一个问题,有时候在编译完一个makefile,接着编译下一个的时候,会提示:


Fatal error:
target queue management failed.
Error starting target ’tcc:’on machine ’Local CPU 1′


不知道是为什么,如果有人了解,拜托留言解惑一下。多谢。

前些日子同事抱怨说,经常一个晚上要出好多个版本,每个版本编译一遍都是大把的时间。于是联想到MTK环境编译必备分布式编译工具——incredibuild,早就听说该工具除了整合visual studio之外,在make环境下也能正常工作。于是决定研究下,把我们的make工程改成能用incredibuild编译。

上google一通搜索,大体了解到主要是使用XGConsole来配合make进行分布式编译,其基本的流程如下:

首先,需要创建一个xml类型的profile作为参数,告诉XGConsole哪些命令可以用于远程调用,一般使用ADS的profile如下:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>
<Profile FormatVersion=”1″>
<Tools>
<Tool Filename=”perl” AllowRemote=”true” />
<Tool Filename=”make” AllowIntercept=”true” />
<Tool Filename=”tcc” AllowRemote=”true” />
<Tool Filename=”tcpp” AllowRemote=”true” />
<Tool Filename=”armasm” AllowRemote=”true” />
<Tool Filename=”armcc” AllowRemote=”true” />
<Tool Filename=”armcpp” AllowRemote=”true” />
<Tool Filename=”strcmpex” AllowRemote=”true” />
<Tool Filename=”warp” AllowRemote=”true” />
<Tool Filename=”armar” AllowRemote=”false” />
<Tool Filename=”fromelf” AllowRemote=”false” />
</Tools>
</Profile>

将以上内容保存成XGConsole.xml,名字其实可以随意。

然后,把所有的make命令中添加参数-j [N],表示允许并行编译,N表示最大需要的并行的数目,我一般是-j 9。类似这样:

make -j 9 -f hellworld.mak

最后,使用命令

XGConsole /command=“make -j 9 -f helloworld.mak” /profile=”XGConsole.xml”

来启动XGConsole来执行分布式编译。

但是也遇到一个问题,有时候在编译完一个makefile,接着编译下一个的时候,会提示:

Fatal error:
target queue management failed.
Error starting target ’tcc:’on machine ’Local CPU 1′

不知道是为什么,如果有人了解,拜托留言解惑一下。多谢。

Copyright © 2024 Jerry Ren
Powered by .NET 8.0 on Kubernetes