From 4c7fcf6e55a668e6433bc37084c2fb4f2ca6e215 Mon Sep 17 00:00:00 2001 From: Ernesto Castellotti Date: Mon, 15 Jul 2019 22:08:05 +0200 Subject: [PATCH] Skip generation of __entrypoint (C main) when dnostdlib is passed to DMD --- src/dmd/compiler.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmd/compiler.d b/src/dmd/compiler.d index db0e4eb9b832..fb407bdf1a4c 100644 --- a/src/dmd/compiler.d +++ b/src/dmd/compiler.d @@ -66,7 +66,7 @@ struct Compiler */ extern (C++) static void genCmain(Scope* sc) { - if (entrypoint) + if (entrypoint || global.params.dnostdlib) return; /* The D code to be generated is provided as D source code in the form of a string. * Note that Solaris, for unknown reasons, requires both a main() and an _main()