Skip to content

Strip and -Os the Spinel native binary - #131

Merged
tobi merged 1 commit into
spinel-aotfrom
spinel-aot-os
Aug 13, 2026
Merged

Strip and -Os the Spinel native binary#131
tobi merged 1 commit into
spinel-aotfrom
spinel-aot-os

Conversation

@tobi

@tobi tobi commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #130. Makes make native emit a smaller release binary:

  • SPINEL_FLAGS ?= -O s (Spinel wants -O LEVEL as two args)
  • strip after link

dist/try went from 1,038,656 (unstripped -O2) to 696,584 (−33%). .text 924 KB → 661 KB.

Hyperfine vs stripped -O2 was noise on --help / small TUI; 1000-dir scan 9.8 vs 9.4 ms. -O3 was larger and only ~0.5 ms faster on that scan.

make native-test still 397/397.

SPINEL ?= spinel
SPINEL_FLAGS ?= -O s
NATIVE = dist/try

$(NATIVE): try.rb lib/tui.rb lib/fuzzy.rb
	mkdir -p dist
	$(SPINEL) $(SPINEL_FLAGS) try.rb -o $(NATIVE)
	strip $(NATIVE)

@tobi
tobi merged commit be56682 into main Aug 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant