Skip to content

Mettle v0.16.1

Choose a tag to compare

@suidvandiewereld suidvandiewereld released this 17 Aug 20:53
· 444 commits to main since this release

Mettle v0.16.1

Linux now runs the same test suite as Windows. Windows 931/931, Linux 917/917.
Running it there for the first time found four real ELF backend defects, fixed
here. The ten cases Linux skips are PE, COFF and Win32 surfaces with no
counterpart.

Fixed

  • Structs passed to C by value were wrong on Linux. The backend applied the
    Microsoft x64 rule everywhere. System V eightbyte classification is now
    implemented, both directions, including C calling an exported Mettle function.
  • The ELF link carried no on-demand runtime, so comparing two strings failed
    at ld on an undefined mettle_string_eq.
  • Profile reports named the wrong functions on Linux: the function id went in
    ECX with Win64 shadow space instead of EDI. new, free and realloc reached
    for the Win32 heap on every target.
  • A native AArch64 Linux host was treated as Windows: .obj outputs, the COFF
    scanner on ELF objects, and std/io selected over std/io.linux.
  • debug.o is bundled on Linux. --explain prints ASCII when redirected.

New

--debug-hooks works on Linux, over a FIFO named by METTLE_DBG_PIPE. A
debuggable build still links no libc. The editor extension remains Windows-only.

Changed (Linux)

  • --build with no -o writes foo, not foo.exe. Most likely to break a
    build script; pass -o foo.exe or use the new name.
  • A source with no extension is refused, rather than writing the product over
    the input.
  • Internal functions take local linkage in whole-program builds, so a program
    may define close, read, write, send, stat or abort. --emit-obj
    objects keep every symbol global.

Full Changelog: v0.16.0...v0.16.1