From 237dfdbdc6f83071cff88489cc66cb83a2d65b00 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 18 Apr 2017 13:57:57 -0400 Subject: error when building exe with no entry point closes #30 --- src/codegen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index d5f1cfe4f6..3061c82766 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4726,7 +4726,9 @@ void codegen_add_root_code(CodeGen *g, Buf *src_dir, Buf *src_basename, Buf *sou assert(g->root_out_name); assert(g->out_type != OutTypeUnknown); - if (!g->is_test_build && g->have_pub_main && (g->out_type == OutTypeObj || g->out_type == OutTypeExe)) { + if (!g->is_test_build && g->zig_target.os != ZigLLVM_UnknownOS && !g->have_c_main && + ((g->have_pub_main && g->out_type == OutTypeObj) || g->out_type == OutTypeExe)) + { g->bootstrap_import = add_special_code(g, create_bootstrap_pkg(g), "bootstrap.zig"); } if (!g->omit_zigrt) { -- cgit v1.2.3