Skip to content

Commit 9ebcabe

Browse files
authored
Merge pull request #1664 from octalide/dev
release: v2.8.0
2 parents cc7405e + b96d363 commit 9ebcabe

24 files changed

Lines changed: 668 additions & 68 deletions

File tree

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug
3+
about: Observed behavior contradicts the spec, docs, or obvious intent
4+
title: ""
5+
labels: ["bug"]
6+
---
7+
8+
<!--
9+
Before submitting, set these in the sidebar, since a template cannot:
10+
area:* one or more of frontend, sema, codegen, link, driver, diag, infra
11+
target:* darwin, windows, or aarch64, only when the work is target-specific
12+
milestone the track this belongs to
13+
flags critical (a miscompilation, data loss, or release blocker) or blocked, when they apply
14+
Put relationships in the body, like "Part of #N" or "Depends on #M".
15+
Use this template for a defect, where the behavior is wrong. Use the Problem template
16+
when the behavior works as built but is wrong by design. The two are mutually exclusive.
17+
-->
18+
19+
## What
20+
21+
<!-- A one or two line summary of the defect. -->
22+
23+
## Repro
24+
25+
<!-- The minimal steps or program that triggers it. -->
26+
27+
## Expected
28+
29+
<!-- What should happen, and why. Cite the spec, docs, or intent if it helps. -->
30+
31+
## Actual
32+
33+
<!-- What happens instead, with the exact diagnostic, exit, or wrong output. -->
34+
35+
## Environment
36+
37+
<!-- The triple or target, the toolchain version or commit, and the OS if it matters. -->

.github/ISSUE_TEMPLATE/chore.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Chore
3+
about: Mechanical upkeep and release engineering (dep bumps, version rolls, cuts, tags, infra)
4+
title: ""
5+
labels: ["chore"]
6+
---
7+
8+
<!--
9+
Before submitting, set these in the sidebar, since a template cannot:
10+
area:* usually infra or driver, but pick what fits
11+
milestone the track this belongs to, if any
12+
Put relationships in the body, like "Part of #N" or "Depends on #M".
13+
Use the refactor or docs label instead when one of those fits better.
14+
-->
15+
16+
## What
17+
18+
<!-- The upkeep task and why it is needed now. -->
19+
20+
## Acceptance
21+
22+
- [ ] <!-- the concrete done state -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/epic.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Epic
3+
about: Umbrella issue tracking a family of sub-issues
4+
title: "epic: "
5+
labels: ["epic"]
6+
---
7+
8+
<!--
9+
Before submitting, set these in the sidebar, since a template cannot:
10+
area:* the dominant area or areas of the family
11+
target:* darwin, windows, or aarch64, only when the whole family is target-specific
12+
milestone the track this epic represents
13+
Wire every child as a native sub-issue from the sidebar, and mirror the list in the
14+
## Children checklist below so the body reads on its own. Write cross-repo children
15+
as owner/repo#N.
16+
-->
17+
18+
> ## Status (YYYY-MM-DD)
19+
>
20+
> <!-- One paragraph on where the track stands today, what is active, and what comes next.
21+
> Keep this block current, since it is the first thing a reader sees. -->
22+
23+
## What
24+
25+
<!-- The goal of the family, why it matters, and the model that ties the children together. -->
26+
27+
## Children
28+
29+
<!-- Mirror the native sub-issues. Markers are [x] done, [ ] todo, and [~] partial. -->
30+
31+
- [ ] #NNNN <!-- short description -->
32+
33+
## Sequencing
34+
35+
<!-- The order things land in and why, including dependencies, what de-risks what, and
36+
what can run in parallel. -->

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature
3+
about: New capability, or an extension of an existing one
4+
title: ""
5+
labels: ["feature"]
6+
---
7+
8+
<!--
9+
Before submitting, set these in the sidebar, since a template cannot:
10+
area:* one or more of frontend, sema, codegen, link, driver, diag, infra
11+
target:* darwin, windows, or aarch64, only when the work is target-specific
12+
milestone the track this belongs to
13+
flags critical (a release blocker) or blocked, when they apply
14+
Put relationships in the body, like "Part of #N", "Depends on #M", or "Blocks #N".
15+
If this is a child of an epic, also add it as a sub-issue on that epic.
16+
-->
17+
18+
Part of #. Depends on #.
19+
20+
## What
21+
22+
<!-- The capability, why it exists, and the design, with enough detail to implement from. -->
23+
24+
## Acceptance
25+
26+
- [ ] <!-- what must be observably true, and the tests that must pass -->

.github/ISSUE_TEMPLATE/problem.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Problem
3+
about: A problem with an existing feature's design or behavior (working as built, wrong by design)
4+
title: ""
5+
labels: ["problem"]
6+
---
7+
8+
<!--
9+
Before submitting, set these in the sidebar, since a template cannot:
10+
area:* one or more of frontend, sema, codegen, link, driver, diag, infra
11+
target:* darwin, windows, or aarch64, only when the work is target-specific
12+
milestone the track this belongs to
13+
flags critical or blocked, when they apply
14+
Put relationships in the body, like "Part of #N", "Depends on #M", or "Blocks #N".
15+
Problem is exclusive with bug. Use this template when the behavior works as built but the
16+
design is wrong, and use the Bug template for an outright defect.
17+
-->
18+
19+
Part of #. Depends on #.
20+
21+
## What
22+
23+
<!-- The current design or behavior, why it is wrong, and how that was confirmed. -->
24+
25+
## Fix
26+
27+
<!-- The proper fix as a design change. List the candidate designs and the preferred one
28+
with its rationale. Do not propose a workaround. -->
29+
30+
## Acceptance
31+
32+
- [ ] <!-- what must be observably true, and the tests that must pass -->

.github/ISSUE_TEMPLATE/rfc.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: RFC
3+
about: Design discussion or request for comment, direction not yet decided
4+
title: "RFC: "
5+
labels: ["rfc"]
6+
---
7+
8+
<!--
9+
Before submitting, set these in the sidebar, since a template cannot:
10+
area:* the area or areas the proposal touches
11+
target:* darwin, windows, or aarch64, only when the work is target-specific
12+
milestone the track this belongs to, if any
13+
Put relationships in the body, like "Part of #N" or "Depends on #M".
14+
An RFC records an open question. Relabel or close it once the direction is decided and
15+
the implementation work is cut into feature or problem issues.
16+
-->
17+
18+
## Problem
19+
20+
<!-- What forces a decision, such as the constraint, gap, or tension. -->
21+
22+
## Proposal
23+
24+
<!-- The proposed direction in enough detail to evaluate, with its limits stated honestly. -->
25+
26+
## Alternatives
27+
28+
<!-- The other directions considered, and why this one is preferred or still open. -->
29+
30+
## Open questions
31+
32+
- <!-- what must be resolved before this can be cut into implementation issues -->

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,38 @@ jobs:
215215
- name: cross-compile and byte-verify the macho fixture
216216
run: bash test/macho/verify.sh "$PWD/m"
217217

218+
# the freestanding/raw flat-image build path (#1616): builds a compiler from the
219+
# PR source, builds the minimal os=freestanding, of=raw x86_64 fixture (which
220+
# links straight from the in-memory codegen images, no per-module .o), confirms
221+
# the output is a container-free flat binary, then mmaps the position-independent
222+
# image and runs it to assert its computed exit code. needs only a C compiler for
223+
# the loader harness - no llvm, no qemu.
224+
cross-freestanding:
225+
name: cross freestanding (raw)
226+
runs-on: ubuntu-latest
227+
steps:
228+
- uses: actions/checkout@v6
229+
230+
- name: fetch released mach
231+
env:
232+
GH_TOKEN: ${{ github.token }}
233+
SEED: mach-*-x86_64-linux.tar.gz
234+
run: |
235+
set -euo pipefail
236+
tmp="$(mktemp -d)"
237+
gh release download -R "$GITHUB_REPOSITORY" -p "$SEED" -D "$tmp"
238+
tar -xzf "$tmp"/$SEED -C /usr/local/bin mach
239+
chmod +x /usr/local/bin/mach
240+
241+
- name: build a compiler from source
242+
run: |
243+
set -euo pipefail
244+
mach dep pull
245+
mach build . -o m
246+
247+
- name: build and run the freestanding raw flat image
248+
run: bash test/freestanding/verify.sh "$PWD/m"
249+
218250
build-windows:
219251
name: build ${{ matrix.target }}
220252
runs-on: ${{ matrix.runs-on }}

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.8.0] - 2026-06-26
9+
10+
The first working bare-metal build, plus a riscv64 codegen fix surfaced by the
11+
new backend. The freestanding `raw` object format now has a real flat-image
12+
build path, so an `os=freestanding, of=raw` target builds end to end.
13+
14+
### Added
15+
16+
- build: a flat-image build path for image-producing object formats. An object
17+
format declares through a `produces_image` predicate whether it round-trips
18+
through relocatable `.o` files, and an image format (the freestanding `raw`
19+
writer) now links straight from the in-memory codegen output, bypassing the
20+
per-module `.o` emit/parse round-trip. This is the last gap to a real
21+
`os=freestanding, of=raw` build (#1616).
22+
23+
### Fixed
24+
25+
- codegen: a riscv64 variable-amount shift with a constant value operand
26+
(`1 << node`) used as a call argument now materializes the constant into a
27+
register before the shift instead of failing to encode. The shift was the lone
28+
reg-reg ALU encoder not materializing an immediate operand (#1657).
29+
- diag: the unknown-os diagnostic now lists `freestanding` among the expected
30+
values (#1617).
31+
832
## [2.7.0] - 2026-06-26
933

1034
First targets on the retargeting foundation. riscv64 lands end to end as the

mach.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
id = "mach"
33
name = "Mach Compiler"
4-
version = "2.7.0"
4+
version = "2.8.0"
55
src = "src"
66
dep = "dep"
77
target = "native"

0 commit comments

Comments
 (0)