File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,28 @@ bat = .bat
1818exe = .exe
1919endif
2020
21- GO_BUILDTAGS ?=
2221ifeq ($(GOOS ) ,darwin)
2322MACOS_SDK_VERSION = $(shell xcrun --show-sdk-version | cut -d . -f 1)
23+ # xcrun command seems to fail even when the SDK is available:
24+ # > xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
25+ ifeq ($(MACOS_SDK_VERSION ) ,)
26+ MACOS_SDK_VERSION = $(shell readlink /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk | sed -E -e "s/^MacOSX//" -e "s/\.[0-9]+\.sdk//")
27+ endif
28+ endif
29+
30+ DEFAULT_ADDITIONAL_DRIVERS :=
31+ ifeq ($(GOOS ) ,darwin)
32+ ifeq ($(GOARCH ) ,arm64)
33+ ifeq ($(shell test $(MACOS_SDK_VERSION ) -ge 14; echo $$? ) ,0)
34+ # krunkit needs macOS 14 or later: https://github.com/containers/libkrun/blob/main/README.md#macos-efi-variant
35+ DEFAULT_ADDITIONAL_DRIVERS += krunkit
36+ endif
37+ endif
38+ endif
39+ ADDITIONAL_DRIVERS ?= $(DEFAULT_ADDITIONAL_DRIVERS )
40+
41+ GO_BUILDTAGS ?=
42+ ifeq ($(GOOS ) ,darwin)
2443ifeq ($(shell test $(MACOS_SDK_VERSION ) -lt 13; echo $$? ) ,0)
2544# The "vz" mode needs macOS 13 SDK or later
2645GO_BUILDTAGS += no_vz
You can’t perform that action at this time.
0 commit comments