diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-31 00:38:49 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-31 00:38:49 +0000 |
commit | 0b1e172cc2c34a62681fdee312b982fc429e792c (patch) | |
tree | 8e27ff062ee5234453cbd514cc8ccfd5feba4037 /gcc/go/go-lang.c | |
parent | 0992f359e902397bd37834767b9a82a71ef7a875 (diff) | |
download | ppe42-gcc-0b1e172cc2c34a62681fdee312b982fc429e792c.tar.gz ppe42-gcc-0b1e172cc2c34a62681fdee312b982fc429e792c.zip |
compiler: Add -fgo-relative-import-path.
* lang.opt (-fgo-relative-import-path): New option.
* go-lang.c (go_relative_import_path): New static variable.
(go_langhook_init): Pass go_relative_import_path to
go_create_gogo.
(go_langhook_handle_option): Handle -fgo-relative-import-path.
* go-c.h (go_create_gogo): Update declaration.
* gccgo.texi (Invoking gccgo): Document
-fgo-relative-import-path.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/go-lang.c')
-rw-r--r-- | gcc/go/go-lang.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index 8aa056fc32f..f5229bbc451 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -85,6 +85,7 @@ struct GTY(()) language_function static const char *go_pkgpath = NULL; static const char *go_prefix = NULL; +static const char *go_relative_import_path = NULL; /* Language hooks. */ @@ -101,7 +102,8 @@ go_langhook_init (void) to, e.g., unsigned_char_type_node) but before calling build_common_builtin_nodes (because it calls, indirectly, go_type_for_size). */ - go_create_gogo (INT_TYPE_SIZE, POINTER_SIZE, go_pkgpath, go_prefix); + go_create_gogo (INT_TYPE_SIZE, POINTER_SIZE, go_pkgpath, go_prefix, + go_relative_import_path); build_common_builtin_nodes (); @@ -240,6 +242,10 @@ go_langhook_handle_option ( go_prefix = arg; break; + case OPT_fgo_relative_import_path_: + go_relative_import_path = arg; + break; + default: /* Just return 1 to indicate that the option is valid. */ break; |