【环境篇】golang环境变量二三事(三)

栏目: IT技术 · 发布时间: 6年前

内容简介:表示"go build -compiler=gccgo",编译时指定的-compiler参数。打包工具,默认"ar"。编译C语言的工具。

GCCGO

The gccgo command to run for 'go build -compiler=gccgo'.

表示"go build -compiler=gccgo",编译时指定的-compiler参数。

AR

The command to use to manipulate library archives when building with the gccgo compiler. The default is 'ar'.

打包工具,默认"ar"。

CC

The command to use to compile C code.

编译 C语言 的工具。

CGO_ENABLED

Whether the cgo command is supported. Either 0 or 1.

是否使用cgo。

CGO_CFLAGS

Flags that cgo will pass to the compiler when compiling C code.

指定编译C语言代码时的参数

CGO_CPPFLAGS 和 CGO_CXXFLAGS

Like CGO_CFLAGS, CGO_CFLAGS_ALLOW, and CGO_CFLAGS_DISALLOW, but for the C preprocessor and C++ compiler.

这两个类似于CGO_CFLAGS,CGO_CPPFLAGS 指定C语言预处理器的编译参数,CGO_CXXFLAGS指定C++的编译参数。

GOGCCFLAGS

环境信息GOGCCFLAGS的值则是 Go 语言在使用操作系统的默认C语言编译器对C语言代码进行编译时加入的参数。

小结

我对cgo的了解不多,以后会对cgo进一步学习,若想了解其他更多环境变量的知识,我这里看到一篇不错的文章,供大家参考: https://wiki.jikexueyuan.com/project/go-command-tutorial/0.14.html

欢迎关注我的公众号: onepunchgo ,会整理相关的文档和资料。

【环境篇】golang环境变量二三事(三)


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Twenty Lectures on Algorithmic Game Theory

Twenty Lectures on Algorithmic Game Theory

Tim Roughgarden / Cambridge University Press / 2016-8-31 / USD 34.99

Computer science and economics have engaged in a lively interaction over the past fifteen years, resulting in the new field of algorithmic game theory. Many problems that are central to modern compute......一起来看看 《Twenty Lectures on Algorithmic Game Theory》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具