From e19f9c25edc46c20eb223492f23f90a99f820ba6 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Thu, 8 Oct 2015 23:07:20 -0400 Subject: [PATCH] [llvmonly] Fix the build. --- mono/mini/mini-llvm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c index 3997ec599e4..226f15c3083 100644 --- a/mono/mini/mini-llvm.c +++ b/mono/mini/mini-llvm.c @@ -7112,7 +7112,10 @@ emit_aot_file_info (MonoLLVMModule *lmodule) fields [tindex ++] = LLVMConstNull (eltype); fields [tindex ++] = LLVMConstNull (eltype); } - fields [tindex ++] = AddJitGlobal (lmodule, eltype, "method_addresses"); + if (!lmodule->llvm_only) + fields [tindex ++] = AddJitGlobal (lmodule, eltype, "method_addresses"); + else + fields [tindex ++] = LLVMConstNull (eltype); fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "blob"); fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "class_name_table"); fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "class_info_offsets"); @@ -7143,10 +7146,10 @@ emit_aot_file_info (MonoLLVMModule *lmodule) else fields [tindex ++] = LLVMConstNull (eltype); fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "assembly_name"); - fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt"); - fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt_end"); - fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unwind_info"); if (!lmodule->llvm_only) { + fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt"); + fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt_end"); + fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unwind_info"); fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unbox_trampolines"); fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unbox_trampolines_end"); fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unbox_trampoline_addresses"); @@ -7154,6 +7157,9 @@ emit_aot_file_info (MonoLLVMModule *lmodule) fields [tindex ++] = LLVMConstNull (eltype); fields [tindex ++] = LLVMConstNull (eltype); fields [tindex ++] = LLVMConstNull (eltype); + fields [tindex ++] = LLVMConstNull (eltype); + fields [tindex ++] = LLVMConstNull (eltype); + fields [tindex ++] = LLVMConstNull (eltype); } for (i = 0; i < MONO_AOT_FILE_INFO_NUM_SYMBOLS; ++i) -- 2.25.1