summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Gottardo <andrea@gottardo.me>2024-09-11 15:11:35 -0700
committerAndrea Gottardo <andrea@gottardo.me>2024-09-11 15:11:35 -0700
commitdabe3d8fb2a7193fd47f6172c16171bfdf701a6f (patch)
tree849e2345c65fba04242536f1e5d471851efe98bd
parentf2713b663effefd635192f9d804f3b2f90f9ecea (diff)
downloadtailscale-angott/tvos-23087.tar.xz
tailscale-angott/tvos-23087.zip
tool/gocross: allow building for tvOS Simulatorangott/tvos-23087
Updates tailscale/corp#23087 Allows gocross to set the proper flags to build ipn-go-bridge on tvOS Simulator.
-rw-r--r--tool/gocross/autoflags.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/gocross/autoflags.go b/tool/gocross/autoflags.go
index c66cab55a..7ad1e3bb5 100644
--- a/tool/gocross/autoflags.go
+++ b/tool/gocross/autoflags.go
@@ -146,7 +146,11 @@ func autoflagsForTest(argv []string, env *Environment, goroot, nativeGOOS, nativ
case env.IsSet("MACOSX_DEPLOYMENT_TARGET"):
xcodeFlags = append(xcodeFlags, "-mmacosx-version-min="+env.Get("MACOSX_DEPLOYMENT_TARGET", ""))
case env.IsSet("TVOS_DEPLOYMENT_TARGET"):
- xcodeFlags = append(xcodeFlags, "-mtvos-version-min="+env.Get("TVOS_DEPLOYMENT_TARGET", ""))
+ if env.Get("TARGET_DEVICE_PLATFORM_NAME", "") == "appletvsimulator" {
+ xcodeFlags = append(xcodeFlags, "-mtvos-version-min="+env.Get("TVOS_DEPLOYMENT_TARGET", "")+"-simulator")
+ } else {
+ xcodeFlags = append(xcodeFlags, "-mtvos-version-min="+env.Get("TVOS_DEPLOYMENT_TARGET", ""))
+ }
default:
return nil, nil, fmt.Errorf("invoked by Xcode but couldn't figure out deployment target. Did Xcode change its envvars again?")
}