mac golang builds slowly after installing the windows build environment
- 2020-05-27 05:52:02
When collaborating with colleagues to develop the golang project, colleagues are developing on the windows platform, and 1 runs the project and finds errors. Later, I tried debugging under the mac environment and installed the windows compiled environment:
$ cd /usr/local/go/src/
$ sudo CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ./make.bash
After debugging, I found that fcntl is not supported under windows, which is really depressing. Later, during development, I found that the compile test package under mac was also significantly slower. It used to take 1,2 seconds to compile, but now it takes 5,6 seconds. It was suspected that the windows build environment had been installed before, so I tried to reinstall golang to OK.
The above mentioned is the solution of this article, hope you can like.