add exit-when-done flag to precompile-lib