aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gccgo.texi
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2016-08-30 03:27:43 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-08-30 03:27:43 +0000
commit2adb671d186febfe9610f8d8ac8ba296b79d2c90 (patch)
tree4e9dd1801c8fffce5ca94c71063a0a5a3acd0d30 /gcc/go/gccgo.texi
parent0b390d608949864df9ce128a5090b1788dc07b16 (diff)
downloadgcc-2adb671d186febfe9610f8d8ac8ba296b79d2c90.zip
gcc-2adb671d186febfe9610f8d8ac8ba296b79d2c90.tar.gz
gcc-2adb671d186febfe9610f8d8ac8ba296b79d2c90.tar.bz2
compiler: add -fgo-c-header=FILE to create a C header
The new -fgo-c-header=FILE option will write a C header file defining all the struct types and numeric const values in package scope. This will be used when building the Go runtime package (libgo/go/runtime) to generate a C header file that may be included by the C code in the C runtime package (libgo/runtime). This will ensure that the Go code and C code are working with the same data structures as we convert the runtime from C to Go to upgrade to the current GC runtime, notably the concurrent garbage collector. Reviewed-on: https://go-review.googlesource.com/28000 * lang.opt (fgo-c-header, fgo-compiling-runtime): New options. * go-c.h (struct go_create_gogo_args): Define. (go_create_gogo): Change declaration to take struct pointer. * go-lang.c (go_c_header): New static variable. (go_langhook_init): Update call to go_create_gogo. * gccgo.texi (Invoking gccgo): Document -fgo-c-header and -fgo-compiling-runtime. From-SVN: r239852
Diffstat (limited to 'gcc/go/gccgo.texi')
-rw-r--r--gcc/go/gccgo.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/go/gccgo.texi b/gcc/go/gccgo.texi
index 6544b79..04ce3e9 100644
--- a/gcc/go/gccgo.texi
+++ b/gcc/go/gccgo.texi
@@ -239,6 +239,17 @@ heap when possible. In the future this may be the default.
Output escape analysis debugging information. Larger values of
@var{n} generate more information.
+@item -fgo-c-header=@var{file}
+@cindex @option{-fgo-c-header}
+Write top-level named Go struct definitions to @var{file} as C code.
+This is used when compiling the runtime package.
+
+@item -fgo-compiling-runtime
+@cindex @option{-fgo-compiling-runtime}
+Apply special rules for compiling the runtime package. Implicit
+memory allocation is forbidden. Some additional compiler directives
+are supported.
+
@item -g
@cindex @option{-g for gccgo}
This is the standard @command{gcc} option (@pxref{Debugging Options, ,