util/racebuild: add package to export a race-is-enabled const

pull/933/head
Brad Fitzpatrick 4 years ago
parent fc8bc76e58
commit ff50ddf1ee

@ -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

@ -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

@ -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
Loading…
Cancel
Save