Skip to content

freebsd: enable systemcrypto with cgo on all architectures - #2476

Merged
George Adams (gdams) merged 1 commit into
microsoft/mainfrom
dev/gadams/freebsd386
Aug 24, 2026
Merged

freebsd: enable systemcrypto with cgo on all architectures#2476
George Adams (gdams) merged 1 commit into
microsoft/mainfrom
dev/gadams/freebsd386

Conversation

@gdams

Copy link
Copy Markdown
Member

Keep systemcrypto enabled for FreeBSD targets and emit an explicit build failure only when an unsupported architecture is built without cgo. Also preserve Windows 386 support in the shared platform checks and update the generated crypto documentation.

Closes #2474

Copilot AI lite review requested due to automatic review settings August 24, 2026 14:27
@gdams
George Adams (gdams) requested a review from a team as a code owner August 24, 2026 14:27
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the Microsoft Go systemcrypto enablement logic so FreeBSD targets keep systemcrypto enabled by default (like Linux/macOS), while producing an explicit compile-time failure only when building unsupported FreeBSD architectures without cgo. It also restores Windows 386 support in the shared “systemcrypto supported” platform checks and updates the generated crypto documentation accordingly.

Changes:

  • Enable systemcrypto for FreeBSD in shared platform gating, and preserve Windows 386 in those checks.
  • Add a FreeBSD-specific nocgo build-failure shim (for non-amd64/arm64) and a corresponding cmd/go test that asserts the expected failure mode/message.
  • Regenerate/update the CrossPlatformCryptography documentation to reflect FreeBSD support with/without cgo.

Patches are happy!

Show a summary per file
File Description
patches/0002-Add-crypto-backends.patch Updates the patch payload to treat FreeBSD as systemcrypto-supported by default, preserve Windows 386 support, and add an explicit FreeBSD nocgo failure path + tests.
eng/doc/CrossPlatformCryptography.md Updates the FreeBSD narrative and cgo support table to reflect systemcrypto enablement behavior.
eng/_util/cmd/updatecryptodocs/header.md Updates the docs generator header so the regenerated documentation matches the new FreeBSD support matrix.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

@gdams
George Adams (gdams) force-pushed the dev/gadams/freebsd386 branch 2 times, most recently from 1650ddb to 8d830c2 Compare August 24, 2026 14:41
@gdams
George Adams (gdams) enabled auto-merge (squash) August 24, 2026 14:46
Keep systemcrypto enabled for FreeBSD targets and emit an explicit build failure only when an unsupported architecture is built without cgo. Also preserve Windows 386 support in the shared platform checks and update the generated crypto documentation.

Closes #2474
@gdams
George Adams (gdams) merged commit f994af1 into microsoft/main Aug 24, 2026
58 checks passed
@gdams
George Adams (gdams) deleted the dev/gadams/freebsd386 branch August 24, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.27.0-1 silently drops systemcrypto when compiling for freebsd/386 instead of failing

3 participants