aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorIlya Verbin <ilya.verbin@intel.com>2014-11-28 12:23:55 +0000
committerIlya Verbin <iverbin@gcc.gnu.org>2014-11-28 12:23:55 +0000
commitf0d78df9dee767b301d1820dcfef65289873ae5c (patch)
tree8ae049e61f4b3c8ed32152bf198318da139f64c4 /gcc/toplev.c
parent0f4fe89599663cf9759cda1ecb64f0d60733c0cc (diff)
downloadgcc-f0d78df9dee767b301d1820dcfef65289873ae5c.zip
gcc-f0d78df9dee767b301d1820dcfef65289873ae5c.tar.gz
gcc-f0d78df9dee767b301d1820dcfef65289873ae5c.tar.bz2
cgraphunit.c (ipa_passes): Handle flag_generate_offload.
gcc/ * cgraphunit.c (ipa_passes): Handle flag_generate_offload. (symbol_table::compile): Set flag_generate_offload if there is something to offload. * common.opt (flag_generate_offload): New Variable declaration. * dwarf2out.c (dwarf2out_finish): Handle flag_generate_offload. * ipa-inline-analysis.c (inline_generate_summary): Do not skip if flag_generate_offload is set. * lto-streamer.c (gate_lto_out): Handle flag_generate_offload. * passes.c (ipa_write_summaries): Do not skip if flag_generate_offload is set. * toplev.c (compile_file): Emit LTO marker if offload info has been previously emitted. Do not emit lto_slim marker if flag_generate_offload is without flag_generate_lto. * tree.c (free_lang_data): Do not skip if flag_generate_offload is set. From-SVN: r218147
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 6e6adfa..2f547bf 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -639,7 +639,7 @@ compile_file (void)
We used to emit an undefined reference here, but this produces
link errors if an object file with IL is stored into a shared
library without invoking lto1. */
- if (flag_generate_lto)
+ if (flag_generate_lto || flag_generate_offload)
{
#if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE,
@@ -653,23 +653,23 @@ compile_file (void)
(unsigned HOST_WIDE_INT) 1,
(unsigned HOST_WIDE_INT) 1);
#endif
- /* Let linker plugin know that this is a slim object and must be LTOed
- even when user did not ask for it. */
- if (!flag_fat_lto_objects)
- {
+ }
+
+ /* Let linker plugin know that this is a slim object and must be LTOed
+ even when user did not ask for it. */
+ if (flag_generate_lto && !flag_fat_lto_objects)
+ {
#if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
- ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE,
- "__gnu_lto_slim",
- (unsigned HOST_WIDE_INT) 1, 8);
+ ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE, "__gnu_lto_slim",
+ (unsigned HOST_WIDE_INT) 1, 8);
#elif defined ASM_OUTPUT_ALIGNED_COMMON
- ASM_OUTPUT_ALIGNED_COMMON (asm_out_file, "__gnu_lto_slim",
- (unsigned HOST_WIDE_INT) 1, 8);
+ ASM_OUTPUT_ALIGNED_COMMON (asm_out_file, "__gnu_lto_slim",
+ (unsigned HOST_WIDE_INT) 1, 8);
#else
- ASM_OUTPUT_COMMON (asm_out_file, "__gnu_lto_slim",
- (unsigned HOST_WIDE_INT) 1,
- (unsigned HOST_WIDE_INT) 1);
+ ASM_OUTPUT_COMMON (asm_out_file, "__gnu_lto_slim",
+ (unsigned HOST_WIDE_INT) 1,
+ (unsigned HOST_WIDE_INT) 1);
#endif
- }
}
/* Attach a special .ident directive to the end of the file to identify