From eb66e13dc4755ddd5380633e4947cfa8ca2ccd55 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 4 Nov 2021 18:20:44 +0000 Subject: [PATCH] Use CGO_ENABLED=0 (#421) Set `CGO_ENABLED` to 0 when building --- CHANGELOG.md | 3 +++ Makefile | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11f8bf8..ce520a4 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/Makefile b/Makefile index 852ac0f..c72046c 100644 --- a/Makefile +++ b/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)