: strip-init-hooks ( -- )
"Stripping startup hooks" show
{
+ "alien.strings"
"command-line"
"cpu.x86"
+ "destructors"
"environment"
"libc"
- "alien.strings"
}
[ init-hooks get delete-at ] each
deploy-threads? get [
run-file
] when ;
+: strip-destructors ( -- )
+ "libc" vocab [
+ "Stripping destructor debug code" show
+ "vocab:tools/deploy/shaker/strip-destructors.factor"
+ run-file
+ ] when ;
+
: strip-call ( -- )
"Stripping stack effect checking from call( and execute(" show
"vocab:tools/deploy/shaker/strip-call.factor" run-file ;
"mallocs" "libc.private" lookup ,
+ "disposables" "destructors" lookup ,
+
deploy-threads? [
"initial-thread" "threads" lookup ,
] unless
: strip ( -- )
init-stripper
strip-libc
+ strip-destructors
strip-call
strip-cocoa
strip-debugger