aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/go-lang.c')
-rw-r--r--gcc/go/go-lang.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 1606524..9f21424 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -150,6 +150,9 @@ go_langhook_init_options_struct (struct gcc_options *opts)
opts->x_flag_exceptions = 1;
opts->x_flag_non_call_exceptions = 1;
+ /* We need to keep pointers live for the garbage collector. */
+ opts->x_flag_keep_gc_roots_live = 1;
+
/* Go programs expect runtime.Callers to work, and that uses
libbacktrace that uses debug info. Set the debug info level to 1
by default. In post_options we will set the debug type if the