tool/gocross: pass flags for visionOS and visionOS Simulator (#11127)

Adds logic in gocross to detect environment variables and pass the right flags so that the backend can be built with the visionOS SDK.

Signed-off-by: Andrea Gottardo <andrea@tailscale.com>
Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
pull/11167/head
Andrea Gottardo 3 months ago committed by GitHub
parent 6b582cb8b6
commit 44e337cc0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -128,6 +128,12 @@ func autoflagsForTest(argv []string, env *Environment, goroot, nativeGOOS, nativ
// Minimum OS version being targeted, results in
// e.g. -mmacosx-version-min=11.3, -miphoneos-version-min=15.0
switch {
case env.IsSet("XROS_DEPLOYMENT_TARGET"):
if env.Get("TARGET_DEVICE_PLATFORM_NAME", "") == "xrsimulator" {
xcodeFlags = append(xcodeFlags, "-mtargetos=xros"+env.Get("XROS_DEPLOYMENT_TARGET", "")+"-simulator")
} else {
xcodeFlags = append(xcodeFlags, "-mtargetos=xros"+env.Get("XROS_DEPLOYMENT_TARGET", ""))
}
case env.IsSet("IPHONEOS_DEPLOYMENT_TARGET"):
if env.Get("TARGET_DEVICE_PLATFORM_NAME", "") == "iphonesimulator" {
xcodeFlags = append(xcodeFlags, "-miphonesimulator-version-min="+env.Get("IPHONEOS_DEPLOYMENT_TARGET", ""))

Loading…
Cancel
Save