Skip to content

build: configure macOS arm64 TinyCC with --config-new_macho=no - #118

Merged
medvednikov merged 1 commit into
vlang:thirdparty-macos-arm64from
quaesitor-scientiam:macos-arm64-new-macho-no
Oct 29, 2026
Merged

medvednikov merged 1 commit into
vlang:thirdparty-macos-arm64from
quaesitor-scientiam:macos-arm64-new-macho-no

Conversation

@quaesitor-scientiam

Copy link
Copy Markdown

Summary

Configure the macOS arm64 TinyCC build with --config-new_macho=no, matching V's own recipe
(thirdparty/build_scripts/thirdparty-macos-arm64_tcc.sh) and the build that
vlang/v#31382 validated.

With --config-new_macho=yes, TCC writes chained fixups whose page_count also lists the
zero-fill __bss pages. macOS 27 dyld maps those pages from the file, so tcc-linked programs
can start with garbage in their globals (vlang/v#29744). vlang/v#31382 measured 13,567 nonzero
BSS bytes with the currently published tcc.exe and listed publishing a corrected bundle as a
merge prerequisite. Its validated build used TinyCC 85ba3ae8 with new_macho=no.

Changes:

  • build.sh: --config-new_macho=yes → no, with a comment explaining why. The page_count
    patch stays applied; its comment now says it only affects chained-fixups builds.
  • automation/bundle-manifest.json: recipe.sha256 updated to the new build.sh.

This PR changes the recipe only. The checked-in tcc.exe is not rebuilt here.

Verification

  • bash -n build.sh
  • Baseline contract probe (automation/probes/baseline-contract.sh) with a validator
    bootstrapped from contract 9ba76b64 and its VC lock (0781dbf8):
    tccbin baseline contract target=macos-arm64 staged=incomplete smoke=v-tcc publish=false: PASS
    on this commit, and on the current head 9792ded as a control.

Test plan

  • baseline contract probe passes locally
  • CI build on this PR passes
  • CI tccbin-branch-gate passes

🤖 Generated with Claude Code

TCC's chained fixups list the zero-fill __bss pages in __DATA's page_count,
and macOS 27 dyld maps them from the file, so tcc-linked programs can start
with garbage in their globals (vlang/v#29744). V's own recipe
(thirdparty/build_scripts/thirdparty-macos-arm64_tcc.sh) already uses
--config-new_macho=no, and vlang/v#31382 validated a TinyCC 85ba3ae8 build
with that setting. This makes the tccbin recipe match it.

The page_count patch stays applied; it only affects chained-fixups builds.
The manifest's recipe.sha256 is updated to the new build.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@medvednikov medvednikov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 9f204adc0da67d9852f1904031649960a23f0b5b, ignoring CI as requested.

No actionable issues found in this recipe-only change.

Checks performed:

  • Confirmed that --config-new_macho=no and the retained --config-codesign match V's arm64 recipe used by #31382.
  • Checked the recorded TinyCC revision 85ba3ae8: the flag selects LC_DYLD_INFO_ONLY, while code signing remains independently enabled. The retained page-count patch affects the chained-fixups path, consistent with the revised comments.
  • Ran bash -n build.sh successfully.
  • Recomputed the exact script SHA-256: 5237a3f2ff5a3816fc6958cf2e41220e0375833ae380e63686be34dd99f142ad, matching recipe.sha256. Confirmed that this digest is the manifest's only semantic change.

Release follow-up: as the description states, tcc.exe is unchanged. A rebuilt and published bundle is still needed to deliver the fix to users and satisfy the corrected-bundle requirement described in vlang/v#31382.

Validation was limited to source review, shell syntax, and manifest integrity. I did not run a native macOS build or runtime tests in this Linux environment.

@medvednikov
medvednikov merged commit 9f887bc into vlang:thirdparty-macos-arm64 Oct 29, 2026
2 checks passed
@quaesitor-scientiam
quaesitor-scientiam deleted the macos-arm64-new-macho-no branch October 29, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants