// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Darwin does not have __thread.
+
+//go:build cgo && unix && !darwin
+
#include <pthread.h>
static __thread int tls;
--- /dev/null
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !(cgo && unix && !darwin)
+
+package cgotlstest
+
+import "testing"
+
+func testTLS(t *testing.T) {
+ t.Skip("__thread is not supported")
+}
}
cgoTest("auto", "test", "auto", "")
+ cgoTest("auto", "testtls", "auto", "")
// Stub out various buildmode=pie tests on alpine until 54354 resolved.
builderName := os.Getenv("GO_BUILDER_NAME")
gt := cgoTest("external-g0", "test", "external", "")
gt.env = append(gt.env, "CGO_CFLAGS=-g0 -fdiagnostics-color")
- cgoTest("auto", "testtls", "auto", "")
cgoTest("external", "testtls", "external", "")
switch {
case os == "aix":