diff --git a/util/racebuild/off.go b/util/racebuild/off.go new file mode 100644 index 000000000..37f0f7cf1 --- /dev/null +++ b/util/racebuild/off.go @@ -0,0 +1,9 @@ +// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !race + +package racebuild + +const On = false diff --git a/util/racebuild/on.go b/util/racebuild/on.go new file mode 100644 index 000000000..b318aa1b3 --- /dev/null +++ b/util/racebuild/on.go @@ -0,0 +1,9 @@ +// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build race + +package racebuild + +const On = true diff --git a/util/racebuild/racebuild.go b/util/racebuild/racebuild.go new file mode 100644 index 000000000..30aad83e9 --- /dev/null +++ b/util/racebuild/racebuild.go @@ -0,0 +1,7 @@ +// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package racebuild exports a constant about whether the current binary +// was built with the race detector. +package racebuild