瀏覽代碼

Use CGO_ENABLED=0 (#421)

Set `CGO_ENABLED` to 0 when building
Jake Howard 3 年之前
父節點
當前提交
eb66e13dc4
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 3 0
      CHANGELOG.md
  2. 2 0
      Makefile

+ 3 - 0
CHANGELOG.md

@@ -26,6 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 - Build against go 1.17. (#553)
 
+- Build with CGO_ENABLED=0 set, to create more portable binaries. This could
+  have an affect on DNS resolution if you rely on anything non-standard. (#421)
+
 ### Deprecated
 
 - The `preferred_ranges` option has been supported as a replacement for

+ 2 - 0
Makefile

@@ -2,6 +2,8 @@ GOMINVERSION = 1.17
 NEBULA_CMD_PATH = "./cmd/nebula"
 GO111MODULE = on
 export GO111MODULE
+CGO_ENABLED = 0
+export CGO_ENABLED
 
 # Set up OS specific bits
 ifeq ($(OS),Windows_NT)