Skip to content

Commit

Permalink
Add comments and extra linker flag
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Sep 10, 2024
1 parent ade3ddd commit 1de8232
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,15 @@ auto-updates: require-version require-s3cmd require-gh-token require-ruby

release: require-version require-s3cmd require-wget require-lantern-binaries require-release-track release-prod copy-beta-installers-to-mirrors invalidate-getlantern-dot-org upload-aab-to-play

# Note from https://github.com/wlynxg/anet?tab=readme-ov-file#how-to-build-with-go-1230-or-later
# The `anet` library internally relies on `//go:linkname` directive. Since the usage of `//go:linkname` has been
# restricted since Go 1.23.0 ([Go 1.23 Release Notes](https://tip.golang.org/doc/go1.23#linker)), it is
# necessary to specify the `-checklinkname=0` linker flag when building the `anet` package with Go 1.23.0 or later.
# Without this flag, the following linker error will occur:
# ```
# link: github.com/wlynxg/anet: invalid reference to net.zoneCache
# ```
$(ANDROID_LIB): export LDFLAGS += -checklinkname=0
$(ANDROID_LIB): $(GO_SOURCES)
go env -w 'GOPRIVATE=github.com/getlantern/*' && \
go install golang.org/x/mobile/cmd/gomobile && \
Expand Down

0 comments on commit 1de8232

Please sign in to comment.