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,
842842 "rustc.embedded.module\0 " . as_ptr ( ) as * const _ ,
843843 ) ;
844844 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 {
846850 "__LLVM,__bitcode\0 "
847851 } else {
848852 ".llvmbc\0 "
@@ -858,7 +862,7 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext,
858862 "rustc.embedded.cmdline\0 " . as_ptr ( ) as * const _ ,
859863 ) ;
860864 llvm:: LLVMSetInitializer ( llglobal, llconst) ;
861- let section = if cgcx . opts . target_triple . triple ( ) . contains ( "-ios" ) {
865+ let section = if is_apple {
862866 "__LLVM,__cmdline\0 "
863867 } else {
864868 ".llvmcmd\0 "
You can’t perform that action at this time.
0 commit comments