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

本文共 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

你可能感兴趣的文章
云中气象 有备而来
查看>>
4.dubbo-demo+简易监控中心安装+管理控制台安装
查看>>
读书笔记《集体智慧编程》Chapter 4 : Searching and Ranking
查看>>
jquery form 插件 分类: JavaScript ...
查看>>
php二维数组访问
查看>>
用Shell实现俄罗斯方块代码(Tetris.sh)
查看>>
[zz]Ubuntu Hadoop HDFS 配置
查看>>
上市后Avaya锣鼓全开,加速战略布局规划
查看>>
日调度5万亿次,腾讯云发布企业级微服务中间件TSF
查看>>
海外侨胞建言四川对外开放:加强内陆省份竞争力成关键
查看>>
2019款奥迪Q7上市 配置增加/69.98万元起售
查看>>
策划求婚、陪挑婚纱,新郎不是我,仍感谢你来过|在百度遇见你
查看>>
从零单排学Redis【铂金一】
查看>>
如何处理Express异常
查看>>
Cycle.js 状态管理模型
查看>>
[译]Effective Kotlin系列之考虑使用原始类型的数组优化性能(五)
查看>>
为什么我从 Google 辞职而为自己工作
查看>>
技术问答集锦(四)
查看>>
针对虚拟机搭建centos7不能上网问题处理方法
查看>>
React 源码分析
查看>>