File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
compiler/rustc_codegen_llvm/src/builder Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ pub(crate) fn gen_image_wrapper_module<'ll>(
65
65
llvm:: set_linkage ( llglobal, ExternalLinkage ) ;
66
66
llvm:: set_visibility ( llglobal, Visibility :: Hidden ) ;
67
67
68
+ let c_name = CString :: new ( "__dummy.omp_offloading_entries" ) . unwrap ( ) ;
69
+ let llglobal = llvm:: add_global ( cx. llmod , offload_entry_arr, & c_name) ;
70
+ llvm:: set_global_constant ( llglobal, true ) ;
71
+ llvm:: set_linkage ( llglobal, InternalLinkage ) ;
72
+ let c_section_name = CString :: new ( "omp_offloading_entries" ) . unwrap ( ) ;
73
+ llvm:: set_section ( llglobal, & c_section_name) ;
74
+ let zeroinit = cx. const_null ( offload_entry_arr) ;
75
+ llvm:: set_initializer ( llglobal, zeroinit) ;
76
+
68
77
// @__start_omp_offloading_entries = external hidden constant [0 x %struct.__tgt_offload_entry]
69
78
// @__stop_omp_offloading_entries = external hidden constant [0 x %struct.__tgt_offload_entry]
70
79
// @__dummy.omp_offloading_entries = internal constant [0 x %struct.__tgt_offload_entry] zeroinitializer, section "omp_offloading_entries"
You can’t perform that action at this time.
0 commit comments