rtl-unification: remove dead archive-resolution code; last test off the archive

Partial Stage-3 teardown — the safe removals that do not affect the bootstrap
chain (the runtime Makefile/ar stay until a release ships a source-build-capable
binary, since the v0.12.0-rooted rolling-bootstrap replay needs them for its
pre-source-build commits):

- Remove FindRTLArchive + TToolchain.RTLPath from uToolchain — dead since the
  link paths source-build the RTL; the field was set but never read.
- TInternalLinkerE2ETests gated on blaise_rtl.a existing, so it silently skipped
  once the archive was gone; gate on the RTL source instead.  It now runs (5
  tests) — the last automated test still tied to the archive.
- Refresh the runtime mem test/bench build-instruction comments to the
  source-built, archive-free invocation (blaise --output, no qbe+gcc+.a).

Full suite green (3829 tests, 1 ignored) — TInternalLinkerE2ETests no longer
skipped.
This commit is contained in:
Graeme Geldenhuys 2026-06-25 23:52:39 +01:00
parent e9030563ea
commit 7a95fd0472
4 changed files with 10 additions and 27 deletions

View file

@ -50,7 +50,6 @@ type
QBE: TTool; { QBE backend only }
Assembler: TTool; { native backend: assemble .s -> .o (reserved) }
Linker: TTool; { both backends: link final binary }
RTLPath: string; { '' if not found }
end;
{ One external tool a backend declares it needs (TBackendDriver.DescribeTools).
@ -87,7 +86,6 @@ function ResolveToolchain(const ATarget: TTargetDesc): TToolchain;
function ResolveQBE: TTool;
function ResolveAssembler: TTool;
function ResolveLinker(const ATarget: TTargetDesc): TTool;
function FindRTLArchive(const ATarget: TTargetDesc): string;
{ Directory containing the running compiler binary (ParamStr(0)). }
function CompilerBinDir: string;
@ -363,18 +361,6 @@ begin
+ '../src/main/pascal');
end;
function FindRTLArchive(const ATarget: TTargetDesc): string;
var
BinDir: string;
begin
Result := GetEnvironmentVariable('BLAISE_RTL');
if (Result <> '') and FileExists(Result) then Exit;
BinDir := CompilerBinDir();
Result := IncludeTrailingPathDelimiter(BinDir) + 'blaise_rtl.a';
if FileExists(Result) then Exit;
Result := '';
end;
{ ------------------------------------------------------------------ }
{ Top-level resolver }
{ ------------------------------------------------------------------ }
@ -384,7 +370,6 @@ begin
Result.QBE := ResolveQBE();
Result.Assembler := ResolveAssembler();
Result.Linker := ResolveLinker(ATarget);
Result.RTLPath := FindRTLArchive(ATarget);
end;
end.

View file

@ -1299,13 +1299,15 @@ end;
function TInternalLinkerE2ETests.CompilerAvailable: Boolean;
begin
{ The compiler source-builds the RTL itself (no blaise_rtl.a); only the binary
and the RTL source need to be present. }
Result := FileExists(FCompiler) and
FileExists(ProjectRoot() + 'compiler/target/blaise_rtl.a');
FileExists(FRTLPath + '/runtime.arc.pas');
if (not Result) and (not GIntLinkSkipNoted) then
begin
GIntLinkSkipNoted := True;
WriteLn(StdErr, 'note: TInternalLinkerE2ETests skipped — compiler binary "',
FCompiler, '" not found');
FCompiler, '" or RTL source not found');
end;
end;

View file

@ -22,12 +22,10 @@
Output: elapsed time in milliseconds per workload. Compare across
runs to detect regressions or improvements.
Build:
Build (the compiler source-builds and links the RTL no blaise_rtl.a):
blaise --source runtime/src/test/pascal/bench_blaise_mem.pas \
--unit-path runtime/src/main/pascal \
--emit-ir > /tmp/bench_mem.ssa
vendor/qbe/qbe -o /tmp/bench_mem.s /tmp/bench_mem.ssa
gcc -o /tmp/bench_mem /tmp/bench_mem.s compiler/target/blaise_rtl.a
--unit-path compiler/src/main/pascal \
--output /tmp/bench_mem
/tmp/bench_mem
}

View file

@ -12,13 +12,11 @@
the string and ARC subsystems. punit is the correct framework here
because blaise_mem has zero dependency on stdlib or ARC.
Build:
Build (the compiler source-builds and links the RTL no blaise_rtl.a):
blaise --source runtime/src/test/pascal/test_blaise_mem.pas \
--unit-path runtime/src/main/pascal \
--unit-path compiler/src/main/pascal \
--unit-path runtime/src/test/pascal \
--emit-ir > /tmp/test_mem.ssa
vendor/qbe/qbe -o /tmp/test_mem.s /tmp/test_mem.ssa
gcc -o /tmp/test_mem /tmp/test_mem.s compiler/target/blaise_rtl.a
--output /tmp/test_mem
/tmp/test_mem -v
}