From eea2452522b1ab58d6f402047c7a24c79104b4b5 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Wed, 7 Sep 2022 10:05:40 +0200 Subject: [PATCH] Build with -mmacosx-version-min=10.13 This allows to build a binary on macOS 11 or newer, but to be able to run it on a macOS 10.13 machine. This causes a lot of warnings to be printed for methods which are only available in macOS 11 or newer, the following commits will handle these warnings. --- audio.go | 2 +- bootloader.go | 2 +- bootloader_arm64.go | 2 +- configuration.go | 2 +- console.go | 2 +- entropy.go | 2 +- graphics_arm64.go | 2 +- keyboard.go | 2 +- memory_balloon.go | 2 +- network.go | 2 +- platform.go | 2 +- platform_arm64.go | 2 +- pointing_device.go | 2 +- shared_folder.go | 2 +- socket.go | 2 +- storage.go | 2 +- virtualization.go | 2 +- virtualization_arm64.go | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/audio.go b/audio.go index 8ddaf18d..ed2e849b 100644 --- a/audio.go +++ b/audio.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/bootloader.go b/bootloader.go index d65b33a3..70768b97 100644 --- a/bootloader.go +++ b/bootloader.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/bootloader_arm64.go b/bootloader_arm64.go index 1c3d59fb..3c217811 100644 --- a/bootloader_arm64.go +++ b/bootloader_arm64.go @@ -4,7 +4,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization_arm64.h" */ diff --git a/configuration.go b/configuration.go index 5722a1c9..7d98c101 100644 --- a/configuration.go +++ b/configuration.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/console.go b/console.go index 98e62825..41f9394d 100644 --- a/console.go +++ b/console.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/entropy.go b/entropy.go index a609b678..d43543ed 100644 --- a/entropy.go +++ b/entropy.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/graphics_arm64.go b/graphics_arm64.go index d5b22d1b..3f736b59 100644 --- a/graphics_arm64.go +++ b/graphics_arm64.go @@ -4,7 +4,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization_arm64.h" */ diff --git a/keyboard.go b/keyboard.go index e121b05d..dde05cef 100644 --- a/keyboard.go +++ b/keyboard.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/memory_balloon.go b/memory_balloon.go index 4c1f11e6..48374a82 100644 --- a/memory_balloon.go +++ b/memory_balloon.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/network.go b/network.go index 11841a36..9aa0d5ca 100644 --- a/network.go +++ b/network.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/platform.go b/platform.go index e0b0633a..cdc79476 100644 --- a/platform.go +++ b/platform.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/platform_arm64.go b/platform_arm64.go index a5784704..9f6b1ba3 100644 --- a/platform_arm64.go +++ b/platform_arm64.go @@ -4,7 +4,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization_arm64.h" */ diff --git a/pointing_device.go b/pointing_device.go index 71f55f34..63d0af01 100644 --- a/pointing_device.go +++ b/pointing_device.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/shared_folder.go b/shared_folder.go index 1ded7444..64b7ea89 100644 --- a/shared_folder.go +++ b/shared_folder.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/socket.go b/socket.go index 858d5aee..a8b69a39 100644 --- a/socket.go +++ b/socket.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/storage.go b/storage.go index b5c2c458..ef1b499f 100644 --- a/storage.go +++ b/storage.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" */ diff --git a/virtualization.go b/virtualization.go index 2649b04e..f377f704 100644 --- a/virtualization.go +++ b/virtualization.go @@ -1,7 +1,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization -framework Cocoa # include "virtualization.h" */ diff --git a/virtualization_arm64.go b/virtualization_arm64.go index dc3fabe3..60007b39 100644 --- a/virtualization_arm64.go +++ b/virtualization_arm64.go @@ -4,7 +4,7 @@ package vz /* -#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=11.0 +#cgo darwin CFLAGS: -x objective-c -fno-objc-arc -mmacosx-version-min=10.13 #cgo darwin LDFLAGS: -lobjc -framework Foundation -framework Virtualization # include "virtualization.h" # include "virtualization_arm64.h"