英文:
Is there a way to get Go to compile and link in one step (6g and 6l at once)?
问题
我正在尝试搜索Google,但关键词'go'使得很难找到任何有用的答案。
阅读http://golang.org/页面也没有找到任何有用的信息。
目前,我在我的bash.rc中有一个简单的函数:
function gogo() {
6g -o gotmp.tmp $@;
6l -o go.out gotmp.tmp;
rm -f gotmp.tmp;
}
然而,这并不完美。希望有一些内置的东西(也许类似于gogcc,但使用6g/6l后端)。
谢谢!
英文:
I'm trying to search Google but the keyword 'go' makes it difficult to find any useful answers.
Reading the http://golang.org/ page doesn't turn up anything useful either.
Right now, I have a simple function in my bash.rc:
function gogo() {
6g -o gotmp.tmp $@;
6l -o go.out gotmp.tmp;
rm -f gotmp.tmp;
}
However, this is not perfect. It would be nice for something built in (perhaps something like gogcc but using 6g/6l backend).
Thanks!
答案1
得分: 6
你有不使用构建系统的理由吗?
$GOROOT/doc/
目录下有一个现成的 Makefile。其他构建系统:https://stackoverflow.com/questions/1735993/what-build-systems-work-with-go
英文:
Do you have a reason to not use a build system?
There is a ready made Makefile in $GOROOT/doc/
. Other build systems: https://stackoverflow.com/questions/1735993/what-build-systems-work-with-go
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论