1 /* go-main.c -- the main function for a Go program.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
13 #ifdef HAVE_FPU_CONTROL_H
14 #include <fpu_control.h>
27 /* The main function for a Go program. This records the command line
28 parameters, calls the real main function, and returns a zero status
29 if the real main function returns. */
31 extern char **environ
;
33 /* The main function. */
36 main (int argc
, char **argv
)
38 runtime_isarchive
= false;
40 if (runtime_isstarted
)
42 runtime_isstarted
= true;
45 runtime_args (argc
, (byte
**) argv
);
48 __go_go (runtime_main
, NULL
);
49 runtime_mstart (runtime_m ());