Skip to content

Commit 8a42da3

Browse files
authored
Fix ios build. (#1758)
Signed-off-by: bwplotka <bwplotka@gmail.com>
1 parent 40c62f7 commit 8a42da3

7 files changed

+8
-5
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 1.21.1 / 2025-03-04
44

55
* [BUGFIX] prometheus: Revert of `Inc`, `Add` and `Observe` cumulative metric CAS optimizations (#1661), causing regressions on low contention cases.
6+
* [BUGFIX] prometheus: Fix GOOS=ios build, broken due to process_collector_* wrong build tags.
67

78
## 1.21.0 / 2025-02-17
89

prometheus/process_collector_darwin.go

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14+
//go:build darwin && !ios
15+
1416
package prometheus
1517

1618
import (

prometheus/process_collector_cgo_darwin.c prometheus/process_collector_mem_cgo_darwin.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
//go:build darwin && cgo
14+
//go:build darwin && !ios && cgo
1515

1616
#include <mach/mach_init.h>
1717
#include <mach/task.h>

prometheus/process_collector_cgo_darwin.go prometheus/process_collector_mem_cgo_darwin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
//go:build darwin && cgo
14+
//go:build darwin && !ios && cgo
1515

1616
package prometheus
1717

prometheus/process_collector_nocgo_darwin.go prometheus/process_collector_mem_nocgo_darwin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
//go:build darwin && !cgo
14+
//go:build darwin && !ios && !cgo
1515

1616
package prometheus
1717

prometheus/process_collector_wasip1_js.go prometheus/process_collector_not_supported.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
//go:build wasip1 || js
15-
// +build wasip1 js
14+
//go:build wasip1 || js || ios
15+
// +build wasip1 js ios
1616

1717
package prometheus
1818

0 commit comments

Comments
 (0)