mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-07 05:57:34 +03:00
internal/cpu: add darwin/arm64 CPU feature detection support
Fixes #42747 Change-Id: I6b1679348c77161f075f0678818bb003fc0e8c86 Reviewed-on: https://go-review.googlesource.com/c/go/+/271989 Trust: Martin Möhrmann <moehrmann@google.com> Run-TryBot: Martin Möhrmann <martisch@uos.de> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
87c3dcff1e
commit
b1e1602b1f
10 changed files with 172 additions and 119 deletions
|
@ -18,7 +18,7 @@ func TestMinimalFeatures(t *testing.T) {
|
|||
// TODO: maybe do MustSupportFeatureDectection(t) ?
|
||||
if runtime.GOARCH == "arm64" {
|
||||
switch runtime.GOOS {
|
||||
case "linux", "android":
|
||||
case "linux", "android", "darwin":
|
||||
default:
|
||||
t.Skipf("%s/%s is not supported", runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
@ -38,10 +38,7 @@ func MustHaveDebugOptionsSupport(t *testing.T) {
|
|||
}
|
||||
|
||||
func MustSupportFeatureDectection(t *testing.T) {
|
||||
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
|
||||
t.Skipf("CPU feature detection is not supported on %s/%s", runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
// TODO: maybe there are other platforms?
|
||||
// TODO: add platforms that do not have CPU feature detection support.
|
||||
}
|
||||
|
||||
func runDebugOptionsTest(t *testing.T, test string, options string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue