|
| 1 | +From d300afb062569278ff9e770b4f7e0ed0d84f6f82 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Oliver Tan < [email protected]> |
| 3 | +Date: Mon, 15 May 2023 14:21:32 +1000 |
| 4 | +Subject: [PATCH] fix bazel compilation for grunning |
| 5 | + |
| 6 | +--- |
| 7 | + pkg/util/grunning/disabled.go | 5 ----- |
| 8 | + pkg/util/grunning/enabled.go | 28 ---------------------------- |
| 9 | + 2 files changed, 33 deletions(-) |
| 10 | + delete mode 100644 pkg/util/grunning/enabled.go |
| 11 | + |
| 12 | +diff --git a/pkg/util/grunning/disabled.go b/pkg/util/grunning/disabled.go |
| 13 | +index 7fdc2f0..89fcb2d 100644 |
| 14 | +--- a/pkg/util/grunning/disabled.go |
| 15 | ++++ b/pkg/util/grunning/disabled.go |
| 16 | +@@ -8,11 +8,6 @@ |
| 17 | + // by the Apache License, Version 2.0, included in the file |
| 18 | + // licenses/APL.txt. |
| 19 | + |
| 20 | +-// See grunning.Supported() for an explanation behind this build tag. |
| 21 | +-// |
| 22 | +-//go:build freebsd || (linux && s390x) || !bazel |
| 23 | +-// +build freebsd linux,s390x !bazel |
| 24 | +- |
| 25 | + package grunning |
| 26 | + |
| 27 | + func grunningnanos() int64 { return 0 } |
| 28 | +diff --git a/pkg/util/grunning/enabled.go b/pkg/util/grunning/enabled.go |
| 29 | +deleted file mode 100644 |
| 30 | +index ab12aae..0000000 |
| 31 | +--- a/pkg/util/grunning/enabled.go |
| 32 | ++++ /dev/null |
| 33 | +@@ -1,28 +0,0 @@ |
| 34 | +-// Copyright 2022 The Cockroach Authors. |
| 35 | +-// |
| 36 | +-// Use of this software is governed by the Business Source License |
| 37 | +-// included in the file licenses/BSL.txt. |
| 38 | +-// |
| 39 | +-// As of the Change Date specified in that file, in accordance with |
| 40 | +-// the Business Source License, use of this software will be governed |
| 41 | +-// by the Apache License, Version 2.0, included in the file |
| 42 | +-// licenses/APL.txt. |
| 43 | +- |
| 44 | +-// See grunning.Supported() for an explanation behind this build tag. |
| 45 | +-// |
| 46 | +-//go:build !(freebsd || (linux && s390x) || !bazel) |
| 47 | +-// +build !freebsd |
| 48 | +-// +build !linux !s390x |
| 49 | +-// +build bazel |
| 50 | +- |
| 51 | +-package grunning |
| 52 | +- |
| 53 | +-import _ "unsafe" // for go:linkname |
| 54 | +- |
| 55 | +-// grunningnanos returns the running time observed by the current goroutine by |
| 56 | +-// linking to a private symbol in the (patched) runtime package. |
| 57 | +-// |
| 58 | +-//go:linkname grunningnanos runtime.grunningnanos |
| 59 | +-func grunningnanos() int64 |
| 60 | +- |
| 61 | +-func supported() bool { return true } |
| 62 | +-- |
| 63 | +2.39.2 (Apple Git-143) |
| 64 | + |
0 commit comments