Skip to content

feat: add per-mold platform support declaration - #33

Merged
skipbit merged 2 commits into
mainfrom
add-per-mold-platform-support
Mar 22, 2026
Merged

feat: add per-mold platform support declaration#33
skipbit merged 2 commits into
mainfrom
add-per-mold-platform-support

Conversation

@skipbit

@skipbit skipbit commented Mar 22, 2026

Copy link
Copy Markdown
Owner

Summary

Add optional source.platforms.supported field to mold schema, allowing
molds to declare which platforms they support. Unsupported platforms are
skipped in the build matrix and completeness check.

Motivation

GCC 15.2.0 does not support aarch64-apple-darwin natively (Homebrew
applies custom patches from iains/gcc-14-branch). The current pipeline
assumes all build-type molds support all Tier 1 platforms, causing
darwin builds to fail.

Changes

Schema (mold-v1.schema.json)

  • Add platformSupport definition: source.platforms.supported (optional)
  • Validated pattern: (linux|darwin)-(x86_64|aarch64)
  • uniqueItems: true, minItems: 1

GCC mold.toml

  • Set source.platforms.supported = ["linux-x86_64", "linux-aarch64"]

ingot-cast.yml

  • Matrix generation filters Tier 1 platforms by mold's supported list
  • Completeness check uses intersection of supported and Tier 1 (not raw count)
  • Backward compatible: omitting source.platforms = all Tier 1

Test plan

  • PR validation passes (schema + Light Build on linux-x86_64)
  • workflow_dispatch with molds/gcc/15.2.0 builds only linux-x86_64 and linux-aarch64
  • darwin-aarch64 is skipped (not failed)
  • Existing LLVM mold (no source.platforms) builds all Tier 1 unchanged

skipbit added 2 commits March 22, 2026 12:27
Add optional source.platforms.supported field to mold schema. When
specified, only listed platforms are built. When omitted, all Tier 1
platforms are used (backward compatible).

Changes:
- schema: add platformSupport definition with validated platform IDs
- GCC 15.2.0 mold.toml: set supported to linux-x86_64 + linux-aarch64
  (upstream GCC does not support aarch64-apple-darwin natively)
- ingot-cast.yml: filter build matrix by source.platforms.supported
- ingot-cast.yml: use per-mold expected count in completeness check
- Completeness check now counts intersection of source.platforms.supported
  and Tier 1 platforms, preventing permanently unpushable molds when
  supported contains non-Tier-1 platform IDs
- Add uniqueItems constraint to source.platforms.supported schema
@skipbit
skipbit merged commit 1246896 into main Mar 22, 2026
5 checks passed
@skipbit
skipbit deleted the add-per-mold-platform-support branch March 22, 2026 04:59
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.

1 participant