Introduce TTargetToolkit (Abstract Factory) and TTargetRegistry so per-target compiler-side objects (native backend + ELF link target) are resolved by name rather than hard-coded case statements. CreateNativeBackend now delegates to the registry; adding a target is a new toolkit + one registration with no edits to existing dispatch. Registers linux-x86_64 (unchanged behaviour) and freebsd-x86_64 (link target with EI_OSABI=9; reuses TX86_64Backend since FreeBSD shares the System V AMD64 ABI). FreeBSD codegen/runtime lands in later steps. The registry uses TOrderedDictionary<string, TTargetToolkit> (name -> toolkit) per the Generics.Collections policy. It is built publish-after-populate: the --incremental compile worker pool is threads, so a half-built global would let a worker wrongly conclude a target has no backend. Step 0a of docs/native-target-architecture.adoc. Behaviour-preserving: FIXPOINT_OK, NATIVE_FIXPOINT_OK, NATIVE_INTERNAL_OK, WARMCACHE_FIXPOINT_OK; full suite 3761 tests green (QBE- and native-built runners). |
||
|---|---|---|
| .. | ||
| src | ||
| project.xml | ||