File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -842,7 +842,11 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext,
842
842
"rustc.embedded.module\0 " . as_ptr ( ) as * const _ ,
843
843
) ;
844
844
llvm:: LLVMSetInitializer ( llglobal, llconst) ;
845
- let section = if cgcx. opts . target_triple . triple ( ) . contains ( "-ios" ) {
845
+
846
+ let is_apple = cgcx. opts . target_triple . triple ( ) . contains ( "-ios" ) ||
847
+ cgcx. opts . target_triple . triple ( ) . contains ( "-darwin" ) ;
848
+
849
+ let section = if is_apple {
846
850
"__LLVM,__bitcode\0 "
847
851
} else {
848
852
".llvmbc\0 "
@@ -858,7 +862,7 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext,
858
862
"rustc.embedded.cmdline\0 " . as_ptr ( ) as * const _ ,
859
863
) ;
860
864
llvm:: LLVMSetInitializer ( llglobal, llconst) ;
861
- let section = if cgcx . opts . target_triple . triple ( ) . contains ( "-ios" ) {
865
+ let section = if is_apple {
862
866
"__LLVM,__cmdline\0 "
863
867
} else {
864
868
".llvmcmd\0 "
You can’t perform that action at this time.
0 commit comments