bool genlib(compile_t* c, ast_t* program) { if(!reachable_actors(c, program) || !generate_actors(c, program) || !genheader(c) ) return false; const char* file_o = genobj(c); if(file_o == NULL) return false; if(c->opt->limit < PASS_ALL) return true; if(!link_lib(c, file_o)) return false; #ifdef PLATFORM_IS_WINDOWS _unlink(file_o); #else unlink(file_o); #endif return true; }
bool genlib(compile_t* c, ast_t* program) { if(!reachable_actors(c, program) || !gentypes(c) || !genheader(c) ) return false; plugin_visit_compile(c, c->opt); if(!genopt(c, true)) return false; if(c->opt->runtimebc) { if(!codegen_merge_runtime_bitcode(c)) return false; // Rerun the optimiser without the Pony-specific optimisation passes. // Inlining runtime functions can screw up these passes so we can't // run the optimiser only once after merging. if(!genopt(c, false)) return false; } const char* file_o = genobj(c); if(file_o == NULL) return false; if(c->opt->limit < PASS_ALL) return true; if(!link_lib(c, file_o)) return false; #ifdef PLATFORM_IS_WINDOWS _unlink(file_o); #else unlink(file_o); #endif return true; }