From d56bdbf84f8c32b5b9726208da7a98286da1e293 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 18 Jun 2026 18:43:23 +0100 Subject: [PATCH] feat(backend): default to the native backend; QBE is now opt-in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flip the compiler's default --backend from qbe to native. Native has full feature parity with QBE (the v0.11.0 cycle's 116 fixes plus the dual-backend e2e harness brought them level), self-hosts, and gives no external codegen dependency, source-level debugging, and a path to cross-compilation — so it is the right default to exercise everywhere. QBE stays fully supported via --backend qbe and remains the cold-bootstrap root: --emit-ir still routes to QBE regardless of the default (PickTopDriver ignores --backend for emit modes), so scripts/rolling-bootstrap.sh, fixpoint.sh, and CI — all of which pass --emit-ir explicitly — are unaffected by this change. The only behaviour change is that a plain 'blaise --source X --output Y' (and a plain 'make' in runtime/) now uses the native backend. Flipping the default surfaced and fixed a real native gap first (the unit-to-.o duplicate-system-defs link collision, previous commit); the full suite is green with the TestRunner built by BOTH a QBE-built and a native-built compiler, and all three fixpoints pass. --- compiler/src/main/pascal/Blaise.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/main/pascal/Blaise.pas b/compiler/src/main/pascal/Blaise.pas index f6cb67f..6f62e41 100644 --- a/compiler/src/main/pascal/Blaise.pas +++ b/compiler/src/main/pascal/Blaise.pas @@ -44,7 +44,7 @@ const CompilerName = 'Blaise'; { Build the --backend usage fragment from the registered drivers, with - the default (bkQBE) entry marked. Keeps the flag parser and the usage + the default (bkNative) entry marked. Keeps the flag parser and the usage text from drifting out of sync with the registry when a backend is added. } function BackendUsageLine: string; @@ -61,7 +61,7 @@ begin if I > 0 then Result := Result + ' | '; Result := Result + Names.Strings[I]; - if ParseBackendName(Names.Strings[I], K) and (K = bkQBE) then + if ParseBackendName(Names.Strings[I], K) and (K = bkNative) then Result := Result + ' (default)'; end; finally @@ -150,7 +150,7 @@ begin AFront.EmitIR := False; AFront.EmitAsm := False; AFront.DumpAST := False; - AFront.Backend := bkQBE; + AFront.Backend := bkNative; { native is the default backend; QBE is opt-in via --backend qbe } AFront.BackendExplicit := False; AFront.SkipDepCodegen := False; AFront.EmitIfaceDir := '';