You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build: the lld stage link fails on Xcode 27's SDK (.tbd target arm64e.x1-macos) when SDKROOT points at it; comp_host_sdk_path trusts SDKROOT unchecked #1826
src/main build fails at the stage2 link (lld path) when the environment exports SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk (what this host's shell had on 2026-09-27):
ld64.lld: error: could not load TAPI file at …/MacOSX27.0.sdk/usr/lib/libm.tbd: malformed file
…/MacOSX27.0.sdk/usr/lib/libm.tbd:4:20: error: unknown architecture
arm64e.x1-macos, arm64e.x1-maccatalyst ]
ld64.lld: error: undefined symbol: _bzero (then _memcpy, _abort, … — libSystem.tbd and libc++.tbd fail the same way)
error: build.w target 'stage2' failed with exit code 1
The same tree builds green with SDKROOT unset (comp_host_sdk_path then picks /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk).
Cause
build/compiler.w comp_host_sdk_path returns SDKROOT first, unchecked. Xcode 27's .tbd files list the target arm64e.x1-macos, which our ld64.lld 22.1.6 does not parse. (Same class as the 2026-09-16 bisect note, which then only hit old commits; the stage2 link reads libm/libSystem/libc++ tbd today.)
Expected
Either the lld link path takes an SDK whose tbd files it can read (and says which it took), or the build refuses up front with one clear diagnostic naming the SDK and the unparseable target, instead of a stage2 link failure with hundreds of undefined symbols. Whichever: a battery driven from a shell with Xcode 27's SDKROOT must not go red for an environment reason at stage2.
Found while building #1810 (fix-strview); worked around with env -u SDKROOT.
Fixed on main: e074a10 (#1913) pins the LLVM SDK in sdk.lock — the published darwin SDK carries the arm64e.x1 backport, :deps installs it, and a compiler link refuses any other .deps SDK — and 8b6b850 (#1926) removes the Apple SDK from the build entirely (the compiler links with its own sysroot and lld). Verified: full build with SDKROOT at MacOSX27.0.sdk; the stack battery green on 3b9d06a.
Activity
build: refuse, before any stage links, a macOS SDK this build's lld c…
build: refuse, before any stage links, a macOS SDK this build's lld c…
nightly-release: darwin-aarch64 pins the republished SDK nightly-sdk-…
sdk: backport arm64e.x1 (llvm/llvm-project b8007a8e) into the LLVM 22…
sdk: every SDK subprocess runs with the shell's toolchain-flag variab…
ci: SDK canary — the pre-stage SDK link check against the newest Xcod…
nightly-release: darwin-aarch64 pins the republished SDK nightly-sdk-…
SDK: arm64e.x1 backport, darwin SDK republish, SDK canary (#1826) (#1880
sdk.lock pins the LLVM SDK: :deps installs the pin, a compiler link r…
ehartford commentedon Sep 30, 2026
Fixed on main: e074a10 (#1913) pins the LLVM SDK in sdk.lock — the published darwin SDK carries the arm64e.x1 backport, :deps installs it, and a compiler link refuses any other .deps SDK — and 8b6b850 (#1926) removes the Apple SDK from the build entirely (the compiler links with its own sysroot and lld). Verified: full build with SDKROOT at MacOSX27.0.sdk; the stack battery green on 3b9d06a.