tool/gocross: add ts_macext build tag for Xcode builds

It's used to control various opt-in functionality for the macOS and iOS
apps, and was lost in the migration to gocross.

Updates tailscale/tailscale#7769

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
pull/7852/head
Mihai Parparita 2 years ago committed by Mihai Parparita
parent 33b006cacf
commit bdc7a61c24

@ -102,6 +102,10 @@ func autoflagsForTest(argv []string, env *Environment, goroot, nativeGOOS, nativ
cgo = nativeGOOS == "darwin"
tags = append(tags, "omitidna", "omitpemdecrypt")
if env.IsSet("XCODE_VERSION_ACTUAL") {
// If we're building via Xcode, we must be making the extension
// version (as opposed to tailscaled on Mac).
tags = append(tags, "ts_macext")
var xcodeFlags []string
// Minimum OS version being targeted, results in
// e.g. -mmacosx-version-min=11.3, -miphoneos-version-min=15.0

@ -301,7 +301,7 @@ TS_LINK_FAIL_REFLECT=0 (was <nil>)`,
wantArgv: []string{
"gocross", "build",
"-trimpath",
"-tags=tailscale_go,omitidna,omitpemdecrypt",
"-tags=tailscale_go,omitidna,omitpemdecrypt,ts_macext",
"-ldflags", "-X tailscale.com/version.longStamp=1.2.3-long -X tailscale.com/version.shortStamp=1.2.3 -X tailscale.com/version.gitCommitStamp=abcd -X tailscale.com/version.extraGitCommitStamp=defg -w",
"./cmd/tailcontrol",
},
@ -333,7 +333,7 @@ TS_LINK_FAIL_REFLECT=1 (was <nil>)`,
wantArgv: []string{
"gocross", "build",
"-trimpath",
"-tags=tailscale_go,omitidna,omitpemdecrypt",
"-tags=tailscale_go,omitidna,omitpemdecrypt,ts_macext",
"-ldflags", "-X tailscale.com/version.longStamp=1.2.3-long -X tailscale.com/version.shortStamp=1.2.3 -X tailscale.com/version.gitCommitStamp=abcd -X tailscale.com/version.extraGitCommitStamp=defg -w",
"./cmd/tailcontrol",
},

Loading…
Cancel
Save