Skip to content

Commit 23dcc59

Browse files
authored
Makefile: add optional build tags for the libtailscale build (#778)
This omits netmap caching in the Android app by allowing us to pass in additional build tags to gomobile. Updates tailscale/corp#39829 Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
1 parent a57cd98 commit 23dcc59

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
DOCKER_IMAGE := tailscale-android-build-amd64-041425-1
1414
export TS_USE_TOOLCHAIN=1
1515

16+
# If set, additional comma-separated build tags passed to the libtailscale Go
17+
# build to control feature selection.
18+
#
19+
# As of 2026-04-15, we disable netmap caching on Android until we have UI
20+
# affordances for debugging it.
21+
GOMOBILE_BUILD_TAGS := ts_omit_cachenetmap
22+
1623
DEBUG_APK := tailscale-debug.apk
1724
RELEASE_AAB := tailscale-release.aab
1825
RELEASE_TV_AAB := tailscale-tv-release.aab
@@ -183,7 +190,7 @@ build-unstripped-aar: tailscale.version $(GOBIN)/gomobile
183190
# The -linkmode=external -extldflags=-Wl,-z,max-page-size=16384 is specific to NDK 23
184191
# to support 16kb page sizes. Your mileage may vary with other NDK versions.
185192
$(GOBIN)/gomobile bind -target android -androidapi 26 \
186-
-tags "$$(./build-tags.sh)" \
193+
-tags "$$(./build-tags.sh) $(GOMOBILE_BUILD_TAGS)" \
187194
-ldflags "-linkmode=external -extldflags=-Wl,-z,max-page-size=16384 $$(./version-ldflags.sh)" \
188195
-o $(ABS_UNSTRIPPED_AAR) ./libtailscale || { echo "gomobile bind failed"; exit 1; }
189196
@if [ ! -f $(ABS_UNSTRIPPED_AAR) ]; then \

0 commit comments

Comments
 (0)