Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不知道你这些命令讲解基于Go的哪个版本,什么系统 #12

Closed
polaris1119 opened this issue Mar 9, 2015 · 4 comments
Closed

Comments

@polaris1119
Copy link

比如,go build 那块,-a 参数,我在mac下,从 go1.1 到 1.4,执行结果跟你说的完全不一样。

而且,你对 -a 的解释:强行对所有涉及到的代码包(包括标准库中的代码包)进行重新构建,即使它们已经是最新的了。

我的理解,-a 只是说会重新编译你项目的文件,不会编译标准库的,要不然有点乱了,实际上,我试验了,也不会编译标准库

@hyper0x
Copy link
Owner

hyper0x commented Mar 9, 2015

是基于1.3版本的

@hyper0x
Copy link
Owner

hyper0x commented Mar 9, 2015

你可以改动下标准库中的代码试验一下?

@hyper0x
Copy link
Owner

hyper0x commented Mar 9, 2015

go build -a -work -n

@hyper0x
Copy link
Owner

hyper0x commented Mar 11, 2015

经我和@polaris1119 的联合试验和确认,在Go 1.4.x版本中,-a标签不会导致标准库中代码包的重新编译。而在Go 1.3.x版本中,其行为恰恰相反。

@hyper0x hyper0x closed this as completed Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants