From 1e2a6be6895560d58e7af6aa433942a65f4b9b87 Mon Sep 17 00:00:00 2001 From: CJ Horton Date: Mon, 17 Jul 2023 11:56:13 -0700 Subject: [PATCH] elaborate further on experiments and cgo --- BUILDING.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 3c13268a1c27..66584de4e2da 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -29,8 +29,14 @@ Experimental features of Terraform will be disabled unless `main.experimentsAllo go build -ldflags "-w -s -X 'main.experimentsAllowed=yes'" -o bin/ . ``` +In the official build process for Terraform, experiments are only allowed in alpha release builds. We recommend that third-party distributors follow that convention in order to reduce user confusion. + ## Go Options -The Terraform release process uses the Go toolchain defaults for the current operating system and processor architecture. +For the most part, the Terraform release process relies on the Go toolchain defaults for the target operating system and processor architecture. + +### `CGO_ENABLED` + +One exception is the `CGO_ENABLED` option, which is set explicitly when building Terraform binaries. For most platforms, we build with `CGO_ENABLED=0` in order to produce a statically linked binary. For MacOS/Darwin operating systems, we build with `CGO_ENABLED=1` to avoid a platform-specific issue with DNS resolution.