Skip to content

feat(#567): default --format to the host system's object format - #570

Merged
octalide merged 2 commits into
devfrom
feat/567
Nov 1, 2026
Merged

octalide merged 2 commits into
devfrom
feat/567

Conversation

@octalide

@octalide octalide commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #567

What

--format now defaults to the host system's object format. The host is the mink system row for $mach.build.sys (linux, darwin, windows), and the default is the first format of its formats list (default first) that names the architecture. All of assemble, listing and inline go through context.open_output and object.format_for, so one path covers them. An explicit --format is unchanged and wins. The ambiguous refusal is replaced by hostless: the host's formats name no code for the architecture.

Decisions

  • The host is picked by $mach.build.sys, as mach-std does, and only selects mink's row. No masc format table. A new host system is one line in object.host, a new format needs no CLI edit.
  • A cross arch takes the host's first format that names it. Where none does and the architecture has exactly one format (wasm, spirv), that one is taken, as before. Only when the host names none and several formats do is it refused as hostless.
  • A host mink has no row for (a BSD) gives no host system, so masc still compiles there and falls to the single-format rule or hostless.

Notes

  • mink's catalog has no BSD system row, so a BSD host needs --format where several formats name the architecture, until mink and object.host state one.
  • No new tests, per the implementation-only rule. check . -a '*' and fmt . are clean.

@octalide
octalide marked this pull request as ready for review October 31, 2026 23:20
@octalide
octalide added this pull request to the merge queue Oct 31, 2026
Merged via the queue into dev with commit e2185de Nov 1, 2026
2 checks passed
@octalide
octalide deleted the feat/567 branch November 1, 2026 00:15
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.

cli: --format defaults to the host's object format, from mink's host row

1 participant