Skip to content

Commit

Permalink
cmd/cgo/internal/testcarchive: build on all platforms
Browse files Browse the repository at this point in the history
This test package uses syscall.SIGSEGV and syscall.SIGPIPE, which are
defined on most, but not all platforms. Normally this test runs as
part of dist test, which only registers this test on platforms that
support c-archive build mode, which includes all platforms that define
these signals. But this doesn't help if you're just trying to type
check everything in cmd.

Add build constraints so that this package type checks on all
platforms.

Fixes #60164.
Updates #37486.

Change-Id: Id3f9ad4cc9f80146de16aedcf85d108a77215ae6
Reviewed-on: https://go-review.googlesource.com/c/go/+/494659
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Auto-Submit: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
aclements authored and gopherbot committed May 12, 2023
1 parent 57009d4 commit 804850d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cmd/cgo/internal/testcarchive/carchive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This test uses various syscall.SIG* constants that are defined on Unix
// platforms and Windows.

//go:build unix || windows

package carchive_test

import (
Expand Down

0 comments on commit 804850d

Please sign in to comment.