diff options
author | Ian Lance Taylor <iant@google.com> | 2012-10-31 00:38:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-10-31 00:38:49 +0000 |
commit | 4e1866fe6f17ad219a2855ab21b5e45de225ce25 (patch) | |
tree | 8e27ff062ee5234453cbd514cc8ccfd5feba4037 /gcc/go/go-lang.c | |
parent | a46837fe1cda1a23de3f99a0c5f7716251eee416 (diff) | |
download | gcc-4e1866fe6f17ad219a2855ab21b5e45de225ce25.zip gcc-4e1866fe6f17ad219a2855ab21b5e45de225ce25.tar.gz gcc-4e1866fe6f17ad219a2855ab21b5e45de225ce25.tar.bz2 |
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.
From-SVN: r193008
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 8aa056f..f5229bb 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; |