博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
golang: impressed by its cross compiling possibilities
阅读量:7294 次
发布时间:2019-06-30

本文共 606 字,大约阅读时间需要 2 分钟。

GOOS="windows" GOARCH="amd64" go build

However till now golang's debug functionality seems far from okay. During debug you cannot print map objects.

And also from debugging related aspects, tool dlv does not support arm arch.

Using an undefined variable can be assigned from function return, or by define.

// The following defines a,b,ca, b, _ := func()var c = 1+2

According to  and by go tool link --help, compile statically using:

CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .

compiling without debug info using: -ldflags '-s -w'

转载于:https://www.cnblogs.com/sansna/p/9279114.html

你可能感兴趣的文章
Python与机器人技术
查看>>
Android 屏幕兼容性
查看>>
JDK 新特性
查看>>
正则表达式_matches(Regex)
查看>>
log代替system.out.println输出
查看>>
对象和数组的遍历方法
查看>>
Jmeter之root ca certificate 问题
查看>>
使用for--each遍历集合
查看>>
MySQL双主+keeplived安装部署说明
查看>>
基于HWND的Win32 UI自动化
查看>>
WebService 入门程序(一)
查看>>
深入计算机系统 练习题2.44 补码运算
查看>>
python 在linux下读取 .xlsx
查看>>
Java 学习 面向对象学习
查看>>
创建一个git仓库
查看>>
理解爬虫原理
查看>>
Linux 多线程
查看>>
iOS“.NET研究”平台应用开发的敏捷设计流程
查看>>
sqlite数据库中自增key的设定,autoincrement 和 rowid
查看>>
【推荐】10款优秀的jQuery图片插件
查看>>