Repository navigation
feat(release): Intel macOS and Windows arm64 tsc - #34
Merged
Merged
Conversation
…he release release.yml builds darwin-x64 (x86_64-apple-darwin) on GitHub's macos-15-intel and win32-arm64 (aarch64-pc-windows-msvc, +crt-static) on GitHub's windows-11-arm: Blacksmith has neither. Each gets the plain build, the PGO build trained on its own platform, the PGO-against-plain check, @tsc-rs/darwin-x64 or @tsc-rs/win32-arm64, an archive and a verify job on the same runner image. The verify job checks that Node's platform and arch match the package. The build timeout goes to 180 minutes for the 4 vCPU runners. ci.yml: the macOS test job cross checks the tsc for x86_64-apple-darwin. Docs: the platform lists and npm/trust-setup.sh (7 packages). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The win32-arm64 instrumented tsc crashed (access violation) in its second training run. rustc's default profile name, default_%m_%p.profraw, has the PID, and Windows gave that run the PID of the run before, so the profile runtime merged into the existing file. That merge (LLVM 22 __llvm_profile_merge_from_buffer) skips the padding after the bitmap bytes, and on arm64 Windows that section has 3 bytes, so it read the value profile data 3 bytes off and past the end of the mapping (cdb stack in lprofMergeValueProfData). build-pgo.sh passes the profile dir to the training command as PGO_PROFILE_DIR, and pgo-train.sh sets LLVM_PROFILE_FILE to <dir>/<project>-<run>-%p.profraw for each run. llvm-profdata merges the files, as before. Linux and macOS never reused a PID, so their profiles do not change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The win32-arm64 training profiles had 3 zero bytes before the function
names, and llvm-profdata rejected every file ("malformed instrumentation
profile data: symbol name is empty"). On arm64, link.exe aligns each
section contribution to 4 bytes, also the 1-byte start marker of the
LLVM names section (.lprfn$A, IMAGE_SCN_ALIGN_1BYTES), so the names began
at offset 4, not 1 (PDB section contributions of the instrumented tsc).
The same padding gave the bitmap section 3 bytes, which broke the
runtime merge.
The win32-arm64 build sets CARGO_TARGET_AARCH64_PC_WINDOWS_MSVC_LINKER to
the toolchain's rust-lld, for the plain, the instrumented and the PGO
build. lld-link keeps the 1-byte alignment, as link.exe does on x64.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Git Bash on the Windows runners has no /dev/stderr, so tee failed in both Windows verify jobs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…file comment A failed cd in one() left the subshell running with rc 0, and rc 1 or 2 counts as expected diagnostics, so it now exits 3. rustc's default -Cprofile-generate name has no PID: every run merged into one file in the runtime, which crashed on arm64 Windows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
t3dotgg
added a commit
that referenced
this pull request
Oct 10, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
t3dotgg
added a commit
that referenced
this pull request
Oct 10, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
t3dotgg
added a commit
that referenced
this pull request
Oct 10, 2026
Automatic merge. main has R188 (goport-int58 515506f, already merged) and PR #34 (CI, release workflow, PGO training, npm files). PORTING.md is unchanged by this merge: main resolved the K2 list as int59 did (G5 no early emit, G6 partial writes). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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 free
to 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.
Problem
T3 Code #16704 switches the typecheck to tsc-rs. tsc-rs 0.2.0 has no binary for Intel Macs or Windows, so on those platforms the T3 Code launcher falls back to the old compiler. #33 added Windows x64. Intel Macs and Windows arm64 were still missing.
Fix
release.ymlbuilds two more platforms, the same way as the others: the plain build, the PGO build trained on its own platform (pgo-train.sh), the PGO-against-plain check, the platform npm package, an archive and a verify job that installs the npm tgz and runstsc-rs.darwin-x64(x86_64-apple-darwin) on GitHub'smacos-15-intel. Blacksmith has no Intel Mac.win32-arm64(aarch64-pc-windows-msvc,+crt-static) on GitHub'swindows-11-arm(free for public repos). Blacksmith has no arm64 Windows.win32-arm64links with the toolchain'srust-lld. On arm64,link.exealigns each section contribution to 4 bytes, also the 1-byte start markers of the LLVM profile sections. The instrumented tsc then wrote 3 zero bytes before the function names, andllvm-profdatarejected every profile ("symbol name is empty"). The PDB section contributions and the.lprfnbytes of the instrumented tsc show it.lld-linkkeeps the 1-byte alignment, aslink.exedoes on x64.pgo-train.sh,PGO_PROFILE_DIRfrombuild-pgo.sh). rustc's default-Cprofile-generatename (default_%m.profraw) has no PID, so every run merged into one file inside the profile runtime, on every platform. That runtime merge crashed on arm64 Windows (access violation inlprofMergeValueProfData, cdb stack). Linux and macOS now write 12 to 16 files instead of 1; the merged profile sizes and the PGO-against-plain check are the same.process.platform-process.archmatches the package, so an emulated Node cannot hide a wrong package.darwin-x64takes about 63 minutes,win32-arm64about 53.ci.yml: the macOS test job cross checks the tsc forx86_64-apple-darwin(33 s), so a PR that breaks Intel macOS fails in CI.npm/trust-setup.shlist the 7 packages. Runnpm/trust-setup.shbefore the next tag:@tsc-rs/darwin-x64,@tsc-rs/win32-arm64(and@tsc-rs/win32-x64from feat(release): Windows x64 tsc and a Windows CI job #33) are new on npm.No Rust changes.
Runs
Head
1219df8f5:darwin-x64build 63 min,win32-arm64build 53 min.x86_64-apple-darwincheck passes on the macOS job.Earlier runs on this PR:
win32-arm64training crashed (exit 139) on the second run.win32-arm64tsc passes the training set. The instrumented one crashes inlprofMergeValueProfData(cdb).llvm-profdatarejected all 12 profiles ("symbol name is empty").rust-lld, the names start right after the marker byte andllvm-profdatareads 63,989 functions.tee /dev/stderr(no/dev/stderrin Git Bash on Actions). Fixed.This PR was made by Claude Opus 5.5 in Claude Code (workflow agent).
🤖 Generated with Claude Code
Summary by CodeRabbit
Note
Add Intel macOS and Windows arm64 tsc release builds
PGO_PROFILE_DIRto custom training commands, and pgo-train.sh writes a separate LLVM profile file per training run and aborts with exit code 3 when a project directory change fails.rust-lldlinker instead of the default linker; PGO training no longer treats a failedcdas an expected compiler diagnostic.Macroscope summarized 271f600.