Expand LLVM native output targets (#280)

* Expand LLVM native output targets

- Add owned helper and runtime-pack contracts for macOS x64, Linux glibc/musl, Windows x64, and WASI.
- Generalize LLVM target selection, package validation, linker plans, and release/CI matrices.
- Document linker boundaries and add focused native-output and runtime-pack coverage.

* Pin Windows LLVM helper CI to VS 2022

The official LLVM archive needs the Visual Studio 2022 CMake generator, which is not guaranteed by windows-latest.

* Align bootstrap cache with LLVM runtime-pack builds

Use the same target-specific helper and linker identity before and after compiler loading so routed executable cache hits remain lightweight.

* Install Windows LLVM CI tools with Chocolatey

windows-2022 includes Visual Studio but not winget; use its available Chocolatey bootstrap for CMake and Ninja.

* Prevent Zig version probes from leaving runtime-pack objects

Run runtime-pack compiler version probes in a private temporary directory and remove the accidental tracked WASI a.o file.

* Use 7-Zip for Windows LLVM setup

Extract the official LLVM development archive with two-stage 7-Zip instead of Windows tar.exe, which timed out while materializing the toolchain tree.

* Define ssize_t for the MSVC runtime pack

Clang's MSVC target does not expose POSIX ssize_t through sys/types.h; define the pointer-sized runtime type without affecting MinGW.

* Build the Windows runtime pack with Zig

Use the MinGW-compatible Windows sysroot required by the runtime while retaining COFF helper output and installing Zig in the Windows native CI lane.

* Give macOS LLVM differential shard time to finish

Shard 1 passed its setup and focused contracts but was cancelled during its cold LLVM differential slice at the 20-minute job limit.
This commit is contained in:
Chris Tate
2026-09-01 13:41:34 -05:00
committed by GitHub
parent 1071b87d77
commit c41f1a8be9
102 changed files with 1909 additions and 224 deletions
+11 -1
View File
@@ -28,7 +28,17 @@ const root = fileURLToPath(new URL("..", import.meta.url));
const readJson = (path) => JSON.parse(readFileSync(root + path, "utf8"));
const version = readJson("packages/cli/package.json").version;
for (const pkg of ["runtime", "runtime-darwin-arm64", "llvm-darwin-arm64", "compiler"]) {
for (const pkg of [
"runtime",
"runtime-darwin-arm64", "runtime-darwin-x64",
"runtime-linux-x64-gnu", "runtime-linux-arm64-gnu",
"runtime-linux-x64-musl", "runtime-linux-arm64-musl",
"runtime-win32-x64-msvc", "runtime-wasm32-wasi",
"llvm-darwin-arm64", "llvm-darwin-x64",
"llvm-linux-x64-gnu", "llvm-linux-arm64-gnu",
"llvm-linux-x64-musl", "llvm-linux-arm64-musl", "llvm-win32-x64-msvc",
"compiler",
]) {
const v = readJson(`packages/${pkg}/package.json`).version;
if (v !== version) {
console.error(
+11 -1
View File
@@ -16,7 +16,17 @@ if (typeof version !== "string" || version.length === 0) {
process.exit(1);
}
for (const pkg of ["runtime", "runtime-darwin-arm64", "compiler", "llvm-darwin-arm64"]) {
for (const pkg of [
"runtime",
"runtime-darwin-arm64", "runtime-darwin-x64",
"runtime-linux-x64-gnu", "runtime-linux-arm64-gnu",
"runtime-linux-x64-musl", "runtime-linux-arm64-musl",
"runtime-win32-x64-msvc", "runtime-wasm32-wasi",
"compiler",
"llvm-darwin-arm64", "llvm-darwin-x64",
"llvm-linux-x64-gnu", "llvm-linux-arm64-gnu",
"llvm-linux-x64-musl", "llvm-linux-arm64-musl", "llvm-win32-x64-msvc",
]) {
const path = manifest(pkg);
const json = read(path);
if (json.version === version) {
+3 -1
View File
@@ -48,7 +48,9 @@ try {
version.protocol_version !== "1" ||
version.scriptc_package_version !== manifest.version ||
version.llvm_version !== "22.1.8" ||
version.default_target !== "arm64-apple-macosx14.0.0"
version.default_target !== "arm64-apple-macosx14.0.0" ||
!Array.isArray(version.supported_targets) ||
!version.supported_targets.includes(version.default_target)
) throw new Error(`packed helper identity mismatch: ${JSON.stringify(version)}`);
const dependencies = execFileSync("otool", ["-L", binary], { encoding: "utf8" });
const nonSystemDependencies = dependencies.trim().split("\n").slice(1)