Files
scriptc/tests
Chris Tate a65267d003 feat: extend runtime symbol localization to Windows hosts and cross targets (#142)
* feat: extend runtime symbol localization to Windows hosts and cross targets

- abi.localize_runtime follows the archive's OBJECT FORMAT instead of the
  build host: ELF and COFF archives localize from any supported host
  (native or cross), Mach-O localization keeps the macOS host linker, and
  the SC3002 fence narrows to the pairings that remain — macos targets
  off darwin hosts (named in the diagnostic) and hosts outside
  darwin/linux/win32
- COFF combine+demote is an in-process transform (object-localize.ts):
  no linker offers a COFF relocatable mode (lld-link mirrors MSVC
  link.exe; zig's COFF driver refuses multi-object merges) and
  llvm-objcopy rejects symbol-scope flags for COFF, so
  mergeAndLocalizeCoffObjects performs the staging archive's member
  selection, the section merge, cross-object symbol resolution by index,
  COMDAT deduplication, and demotion to static over the object bytes;
  survivors drop the COMDAT flag so mingw .refptr stubs never
  deduplicate against another archive's copies at the embedder's link,
  and per-object CodeView sections stay out of the merged member (their
  item indices are a per-object contract)
- cross ELF merges through `zig cc -target <triple> -r` (zig is already
  the cross driver's hard requirement) and localizeElfObject demotes in
  process — locals-first symbol reorder, relocation remap, COMMONs kept
  global — resolving section groups the way binutils'
  --force-group-allocation does; the darwin ld64 and native-linux
  binutils recipes are byte-for-byte the historical ones, and darwin
  hosts now admit macos cross triples through the same ld64 arm
- library-multi grows the M10/M11 cross lanes (SCRIPTC_CROSS, with
  container and Windows-box execution legs, thread-instanced composition
  included), runs M1/M2/M6/M7 on win32 hosts (`zig cc` probes, llvm-nm
  symbol checks, CRLF-normalized probe output), and object-localize.test.ts
  pins the transforms over synthesized objects in every suite
- non-localized archives are unchanged byte-for-byte

* fix: tighten runtime object localization

* fix: honor COFF COMDAT selection semantics

* test: serialize cross-target library builds

* docs: clarify Windows library link dependencies
2026-08-12 18:26:03 -05:00
..
2026-07-22 18:08:04 -05:00