Uh oh!
There was an error while loading. Please reload this page.
build: let the environment override MACOS_TARGET - #61
Merged
barnstar merged 1 commit intoAug 31, 2026
Conversation
`MACOS_TARGET := 15.0` is a simply-expanded assignment, so an environment variable does not override it. `MACOS_TARGET=14.0 make c-archive` builds 15.0 and reports success — you set the floor, make agrees, and you get the old one. Only `make MACOS_TARGET=14.0 c-archive` works. Measured with `make -n` against this Makefile, GOOS=darwin: before after env override 15.0 14.0 command-line 14.0 14.0 default 15.0 15.0 `?=` fixes the environment case and changes nothing else: a command-line override still wins, and the default is untouched for anyone not setting it. Found while lowering the macOS floor of a TailscaleKit.xcframework built from this repo. The failure is quiet in a way that matters here — nothing warns, the build succeeds, and the resulting binary is stamped with a floor its Go objects do not actually support. On macOS the only signal is an `ld: warning: object file ... was built for newer 'macOS' version`, which is easy to lose in build output. This is the same knob tailscale#60's "Aside" points at: if the project lowers its own deployment targets, whoever does it is likely to reach for the environment variable first. Not touched here: the comment above the line still says the wrapper requires macOS 15.0 features. That is a separate question and depends on tailscale#60, which measures macOS 14.0 as buildable once the listener API is gated.
barnstar
approved these changes
Aug 31, 2026
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MACOS_TARGET := 15.0is a simply-expanded assignment, so an environment variable does not override it.MACOS_TARGET=14.0 make c-archivebuilds 15.0 and reports success — you set the floor, make agrees, and you get the old one. Onlymake MACOS_TARGET=14.0 c-archiveworks.Measured
make -n,GOOS=darwin, against this Makefile:MACOS_TARGET=14.0 make …(env)make MACOS_TARGET=14.0 …(command line)?=fixes the environment case and changes nothing else: a command-line override still wins, and the default is untouched for anyone not setting it.Why it's worth fixing
The failure is quiet in a way that matters for this particular variable. Nothing warns, the build succeeds, and the resulting binary is stamped with a floor its Go objects don't actually support. On macOS the only signal is an
ld: warning: object file … was built for newer 'macOS' version, which is easy to lose in build output — andotoolwon't catch it either, since it reports the number the binary claims.Found while lowering the macOS floor of a
TailscaleKit.xcframeworkbuilt from this repo.It's also the same knob #60's "Aside" points at: if the project lowers its own deployment targets, whoever does that is likely to reach for the environment variable first.
Not touched here
The comment above the line still says the wrapper requires macOS 15.0 features. That's a separate question and depends on #60, which measures macOS 14.0 as buildable once the listener API is gated — happy to follow up there if that lands.