diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 9676702f28387f..ff59fb59921882 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -6,25 +6,36 @@ "version": "6.0.4", "commands": [ "coverlet" - ] + ], + "rollForward": false }, "dotnet-reportgenerator-globaltool": { "version": "5.4.3", "commands": [ "reportgenerator" - ] + ], + "rollForward": false }, "microsoft.dotnet.xharness.cli": { "version": "11.0.0-prerelease.26204.1", "commands": [ "xharness" - ] + ], + "rollForward": false }, "microsoft.visualstudio.slngen.tool": { "version": "12.0.15", "commands": [ "slngen" - ] + ], + "rollForward": false + }, + "dotnet-serve": { + "version": "1.10.194", + "commands": [ + "dotnet-serve" + ], + "rollForward": false } } -} +} \ No newline at end of file diff --git a/NuGet.config b/NuGet.config index 8d2d351914d014..8aee39e078caa3 100644 --- a/NuGet.config +++ b/NuGet.config @@ -12,6 +12,11 @@ one as a template. The following line is a marker to insert the test restore sources. --> + + + + + diff --git a/eng/Version.Details.props b/eng/Version.Details.props index afdfd5818acf34..97862ed07ff7d9 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -46,7 +46,7 @@ This file should be imported by eng/Versions.props 11.0.0-preview.4.26211.102 11.0.0-preview.4.26211.102 - 11.0.0-alpha.1.26181.1 + 11.0.0-alpha.1.26253.2 19.1.0-alpha.1.26173.1 19.1.0-alpha.1.26173.1 @@ -60,10 +60,10 @@ This file should be imported by eng/Versions.props 19.1.0-alpha.1.26173.1 19.1.0-alpha.1.26173.1 19.1.0-alpha.1.26173.1 - 19.1.0-alpha.1.26173.1 - 19.1.0-alpha.1.26173.1 - 19.1.0-alpha.1.26173.1 - 19.1.0-alpha.1.26173.1 + 23.1.0-alpha.1.26253.2 + 23.1.0-alpha.1.26253.2 + 23.1.0-alpha.1.26253.2 + 23.1.0-alpha.1.26253.2 19.1.0-alpha.1.26173.1 19.1.0-alpha.1.26173.1 19.1.0-alpha.1.26173.1 @@ -81,7 +81,7 @@ This file should be imported by eng/Versions.props 11.0.0-alpha.1.26173.2 11.0.0-alpha.1.26173.2 11.0.0-alpha.1.26173.2 - 11.0.0-alpha.1.26173.2 + 11.0.0-alpha.1.26253.2 11.0.0-alpha.1.26173.2 11.0.0-alpha.1.26173.2 11.0.0-alpha.1.26173.2 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ee7fa3d9101fb4..a284642b521b13 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,9 +1,9 @@ - + https://github.com/dotnet/icu - 8fe317e707aaa0ab5afeafa926b03cb8deb22d09 + 7c453973afa2c84b6a3108a75ab5ce33e032c7e0 https://github.com/dotnet/llvm-project @@ -199,17 +199,17 @@ https://github.com/dotnet/llvm-project adb0185573ea50f6622e29860297b7a3213b1000 - + https://github.com/dotnet/llvm-project - adb0185573ea50f6622e29860297b7a3213b1000 + ea6d86cebc8645183640fa0c19eafbff913ec424 - + https://github.com/dotnet/llvm-project - adb0185573ea50f6622e29860297b7a3213b1000 + ea6d86cebc8645183640fa0c19eafbff913ec424 - + https://github.com/dotnet/llvm-project - adb0185573ea50f6622e29860297b7a3213b1000 + ea6d86cebc8645183640fa0c19eafbff913ec424 https://github.com/dotnet/llvm-project @@ -381,9 +381,9 @@ https://github.com/dotnet/node 0077cd1a0d5bb524db161e5ec289496390c7f5d0 - + https://github.com/dotnet/node - 0077cd1a0d5bb524db161e5ec289496390c7f5d0 + 5159dfffaeaf4e3c0e3b7909149d31a66ac71099 https://github.com/dotnet/node diff --git a/eng/Versions.props b/eng/Versions.props index 6b58c62b178aa3..cb3d129646241a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -169,10 +169,10 @@ 2.5.7 $(MicrosoftDotNetApiCompatTaskPackageVersion) - 10.0.0 - $(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion) + 11.0.0-preview.4.26253.2 + $(runtimelinuxx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion) - 3.1.56 + 5.0.6 1.1.87-gba258badda 1.0.0-v3.14.0.5722 diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 4f9a1b1d896c58..a604f485d8c763 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -636,21 +636,21 @@ if(LLVM_PREFIX) string(REGEX REPLACE ".*MONO_API_VERSION ([0-9]+)" "\\1" llvm_api_version ${llvm_api_version_line}) # IMPORTANT: when bumping LLVM make sure to rerun the llvm-config commands below and update the variables accordingly - if (NOT ${llvm_api_version} EQUAL 1900) + if (NOT ${llvm_api_version} EQUAL 2300) message(FATAL_ERROR "Unexpected LLVM version: ${llvm_api_version}.") endif() - # llvm-config --libs analysis core bitwriter mcjit orcjit - set(MONO_llvm_core_libs "LLVMOrcJIT" "LLVMPasses" "LLVMIRPrinter" "LLVMHipStdPar" "LLVMCoroutines" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendOffloading" "LLVMCodeGen" "LLVMScalarOpts" "LLVMInstCombine" "LLVMObjCARCOpts" "LLVMCodeGenTypes" "LLVMCFGuard" "LLVMAggressiveInstCombine" "LLVMTransformUtils" "LLVMWindowsDriver" "LLVMJITLink" "LLVMOption" "LLVMMCJIT" "LLVMExecutionEngine" "LLVMTarget" "LLVMRuntimeDyld" "LLVMOrcTargetProcess" "LLVMOrcShared" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBitReader" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") + # llvm-config --libs orcjit mcjit + set(MONO_llvm_core_libs "LLVMMCJIT" "LLVMOrcJIT" "LLVMPasses" "LLVMIRPrinter" "LLVMHipStdPar" "LLVMCoroutines" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMSandboxIR" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendDirective" "LLVMFrontendAtomic" "LLVMFrontendOffloading" "LLVMObjectYAML" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCodeGen" "LLVMScalarOpts" "LLVMInstCombine" "LLVMObjCARCOpts" "LLVMCodeGenTypes" "LLVMCGData" "LLVMBitWriter" "LLVMCFGuard" "LLVMAggressiveInstCombine" "LLVMTransformUtils" "LLVMWindowsDriver" "LLVMJITLink" "LLVMOption" "LLVMExecutionEngine" "LLVMTarget" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMFrontendHLSL" "LLVMRuntimeDyld" "LLVMOrcTargetProcess" "LLVMOrcShared" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") - # llvm-config --libs x86codegen - set(MONO_llvm_extra_libs_x86codegen "LLVMX86CodeGen" "LLVMX86Desc" "LLVMX86Info" "LLVMMCDisassembler" "LLVMInstrumentation" "LLVMIRPrinter" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCodeGenTypes" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBitReader" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") + # llvm-config --libs x86 + set(MONO_llvm_extra_libs_x86codegen "LLVMX86TargetMCA" "LLVMMCA" "LLVMX86Disassembler" "LLVMX86AsmParser" "LLVMX86CodeGen" "LLVMX86Desc" "LLVMX86Info" "LLVMMCDisassembler" "LLVMInstrumentation" "LLVMIRPrinter" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCodeGenTypes" "LLVMCGData" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMBitReader" "LLVMFrontendHLSL" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") - # llvm-config --libs armcodegen - set(MONO_llvm_extra_libs_armcodegen "LLVMARMCodeGen" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendOffloading" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMARMDesc" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMMCDisassembler" "LLVMCodeGenTypes" "LLVMARMUtils" "LLVMARMInfo" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") + # llvm-config --libs arm + set(MONO_llvm_extra_libs_armcodegen "LLVMARMDisassembler" "LLVMARMAsmParser" "LLVMARMCodeGen" "LLVMARMDesc" "LLVMARMUtils" "LLVMARMInfo" "LLVMipo" "LLVMInstrumentation" "LLVMVectorize" "LLVMLinker" "LLVMFrontendOpenMP" "LLVMFrontendDirective" "LLVMFrontendAtomic" "LLVMFrontendOffloading" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCodeGenTypes" "LLVMCGData" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMMCDisassembler" "LLVMFrontendHLSL" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") - # llvm-config --libs aarch64codegen - set(MONO_llvm_extra_libs_aarch64codegen "LLVMAArch64CodeGen" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMAArch64Desc" "LLVMCodeGenTypes" "LLVMAArch64Utils" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMAArch64Info" "LLVMMC" "LLVMDebugInfoCodeView" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") + # llvm-config --libs aarch64 + set(MONO_llvm_extra_libs_aarch64codegen "LLVMAArch64Disassembler" "LLVMAArch64AsmParser" "LLVMAArch64CodeGen" "LLVMAArch64Desc" "LLVMAArch64Utils" "LLVMAArch64Info" "LLVMGlobalISel" "LLVMSelectionDAG" "LLVMCFGuard" "LLVMAsmPrinter" "LLVMCodeGen" "LLVMTarget" "LLVMScalarOpts" "LLVMInstCombine" "LLVMAggressiveInstCombine" "LLVMObjCARCOpts" "LLVMTransformUtils" "LLVMCodeGenTypes" "LLVMCGData" "LLVMBitWriter" "LLVMAnalysis" "LLVMProfileData" "LLVMSymbolize" "LLVMDebugInfoBTF" "LLVMDebugInfoPDB" "LLVMDebugInfoMSF" "LLVMDebugInfoCodeView" "LLVMDebugInfoGSYM" "LLVMDebugInfoDWARF" "LLVMObject" "LLVMTextAPI" "LLVMMCParser" "LLVMIRReader" "LLVMAsmParser" "LLVMBitReader" "LLVMMC" "LLVMDebugInfoDWARFLowLevel" "LLVMMCDisassembler" "LLVMFrontendHLSL" "LLVMCore" "LLVMRemarks" "LLVMBitstreamReader" "LLVMBinaryFormat" "LLVMTargetParser" "LLVMSupport" "LLVMDemangle") if(HOST_LINUX AND NOT HOST_WASM AND NOT HOST_WASI) set(MONO_stdlib "-nostdinc++ -nostdlib++") diff --git a/src/mono/browser/emscripten-version.txt b/src/mono/browser/emscripten-version.txt index 4a8bd23c1443d4..4d5e5283b97fb2 100644 --- a/src/mono/browser/emscripten-version.txt +++ b/src/mono/browser/emscripten-version.txt @@ -1 +1 @@ -3.1.56 \ No newline at end of file +5.0.6 \ No newline at end of file diff --git a/src/mono/mono/mini/mini-llvm-cpp.cpp b/src/mono/mono/mini/mini-llvm-cpp.cpp index 80d99c341c6802..2c2c02d0073c72 100644 --- a/src/mono/mono/mini/mini-llvm-cpp.cpp +++ b/src/mono/mono/mini/mini-llvm-cpp.cpp @@ -308,12 +308,12 @@ mono_llvm_replace_uses_of (LLVMValueRef var, LLVMValueRef v) } LLVMValueRef -mono_llvm_create_constant_data_array (const uint8_t *data, int len) +mono_llvm_create_constant_data_array (LLVMContextRef ctx, const uint8_t *data, int len) { #if LLVM_API_VERSION >= 1600 - return wrap(ConstantDataArray::get (*unwrap(LLVMGetGlobalContext ()), ArrayRef(data, len))); + return wrap(ConstantDataArray::get (*unwrap(ctx), ArrayRef(data, len))); #else - return wrap(ConstantDataArray::get (*unwrap(LLVMGetGlobalContext ()), makeArrayRef(data, len))); + return wrap(ConstantDataArray::get (*unwrap(ctx), makeArrayRef(data, len))); #endif } @@ -514,7 +514,7 @@ mono_llvm_add_param_attr_with_type (LLVMValueRef param, AttrKind kind, LLVMTypeR switch (kind) { case LLVM_ATTR_STRUCT_RET: - func->addParamAttr (n, Attribute::getWithStructRetType (*unwrap (LLVMGetGlobalContext ()), unwrap (type))); + func->addParamAttr (n, Attribute::getWithStructRetType (func->getContext (), unwrap (type))); break; default: g_assert_not_reached (); @@ -526,7 +526,7 @@ mono_llvm_add_param_byval_attr (LLVMValueRef param, LLVMTypeRef type) { Function *func = unwrap (param)->getParent (); int n = unwrap (param)->getArgNo (); - func->addParamAttr (n, Attribute::getWithByValType (*unwrap (LLVMGetGlobalContext ()), unwrap (type))); + func->addParamAttr (n, Attribute::getWithByValType (func->getContext (), unwrap (type))); } void @@ -542,7 +542,7 @@ mono_llvm_add_instr_attr_with_type (LLVMValueRef val, int index, AttrKind kind, switch (kind) { case LLVM_ATTR_STRUCT_RET: - attr = Attribute::getWithStructRetType (*unwrap (LLVMGetGlobalContext ()), unwrap (type)); + attr = Attribute::getWithStructRetType (unwrap (val)->getContext (), unwrap (type)); unwrap (val)->addParamAttr (index - 1, attr); break; default: @@ -553,7 +553,7 @@ mono_llvm_add_instr_attr_with_type (LLVMValueRef val, int index, AttrKind kind, void mono_llvm_add_instr_byval_attr (LLVMValueRef val, int index, LLVMTypeRef type) { - unwrap (val)->addParamAttr (index - 1, Attribute::getWithByValType (*unwrap (LLVMGetGlobalContext ()), unwrap (type))); + unwrap (val)->addParamAttr (index - 1, Attribute::getWithByValType (unwrap (val)->getContext (), unwrap (type))); } void* @@ -603,7 +603,7 @@ mono_llvm_di_create_file (void *di_builder, const char *dir, const char *file) void* mono_llvm_di_create_location (void *di_builder, void *scope, int row, int column) { - return DILocation::get (*unwrap(LLVMGetGlobalContext ()), row, column, (Metadata*)scope); + return DILocation::get (cast((Metadata*)scope)->getContext (), row, column, (Metadata*)scope); } void @@ -631,7 +631,7 @@ mono_llvm_di_builder_finalize (void *di_builder) LLVMValueRef mono_llvm_get_or_insert_gc_safepoint_poll (LLVMModuleRef module) { - llvm::FunctionCallee callee = unwrap(module)->getOrInsertFunction("gc.safepoint_poll", FunctionType::get(unwrap(LLVMVoidType()), false)); + llvm::FunctionCallee callee = unwrap(module)->getOrInsertFunction("gc.safepoint_poll", FunctionType::get(Type::getVoidTy(unwrap(module)->getContext()), false)); return wrap (dyn_cast (callee.getCallee ())); } @@ -720,12 +720,16 @@ mono_llvm_register_intrinsic (LLVMModuleRef module, IntrinsicId id, LLVMTypeRef auto intrins_id = get_intrins_id (id); if (intrins_id != not_intrinsic) { + #if LLVM_API_VERSION >= 2000 + Function *f = Intrinsic::getOrInsertDeclaration (unwrap (module), intrins_id); +#else Function *f = Intrinsic::getDeclaration (unwrap (module), intrins_id); +#endif if (!f) { outs () << id << "\n"; g_assert_not_reached (); } - auto type = Intrinsic::getType (*unwrap(LLVMGetGlobalContext ()), intrins_id); + auto type = Intrinsic::getType (unwrap (module)->getContext (), intrins_id); *out_type = wrap (type); return wrap (f); } else { @@ -748,8 +752,12 @@ mono_llvm_register_overloaded_intrinsic (LLVMModuleRef module, IntrinsicId id, L Type *arr [max_types]; for (int i = 0; i < ntypes; ++i) arr [i] = unwrap (types [i]); +#if LLVM_API_VERSION >= 2000 + auto f = Intrinsic::getOrInsertDeclaration (unwrap (module), intrins_id, { arr, (size_t)ntypes }); +#else auto f = Intrinsic::getDeclaration (unwrap (module), intrins_id, { arr, (size_t)ntypes }); - auto type = Intrinsic::getType (*unwrap(LLVMGetGlobalContext ()), intrins_id, { arr, (size_t)ntypes }); +#endif + auto type = Intrinsic::getType (unwrap (module)->getContext (), intrins_id, { arr, (size_t)ntypes }); *out_type = wrap (type); return wrap (f); } @@ -784,8 +792,8 @@ mono_llvm_inline_asm (LLVMBuilderRef builder, LLVMTypeRef type, } LLVMTypeRef -mono_llvm_get_ptr_type (void) +mono_llvm_get_ptr_type (LLVMContextRef ctx) { - PointerType *t = PointerType::get (*unwrap (LLVMGetGlobalContext ()), 0); + PointerType *t = PointerType::get (*unwrap (ctx), 0); return wrap (t); } diff --git a/src/mono/mono/mini/mini-llvm-cpp.h b/src/mono/mono/mini/mini-llvm-cpp.h index 9f40accf3043ac..7882ee1ce8ce52 100644 --- a/src/mono/mono/mini/mini-llvm-cpp.h +++ b/src/mono/mono/mini/mini-llvm-cpp.h @@ -111,7 +111,7 @@ void mono_llvm_set_must_tailcall (LLVMValueRef call_ins); LLVMValueRef -mono_llvm_create_constant_data_array (const uint8_t *data, int len); +mono_llvm_create_constant_data_array (LLVMContextRef ctx, const uint8_t *data, int len); void mono_llvm_set_is_constant (LLVMValueRef global_var); @@ -234,7 +234,7 @@ mono_llvm_inline_asm (LLVMBuilderRef builder, LLVMTypeRef type, const char *name); LLVMTypeRef -mono_llvm_get_ptr_type (void); +mono_llvm_get_ptr_type (LLVMContextRef ctx); G_END_DECLS diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index f310f7364f5d88..6198f2aa31dd8d 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -30,6 +30,9 @@ #define __STDC_CONSTANT_MACROS #endif +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #include "llvm-c/Core.h" #include "llvm-c/BitWriter.h" #include "llvm-c/Analysis.h" @@ -8075,7 +8078,7 @@ MONO_RESTORE_WARNING LLVMValueRef info_var = LLVMAddGlobal (ctx->lmodule, LLVMArrayType (LLVMInt8Type (), 8), "@OBJC_IMAGE_INFO"); int32_t objc_imageinfo [] = { 0, 0 }; - LLVMSetInitializer (info_var, mono_llvm_create_constant_data_array ((uint8_t *) &objc_imageinfo, 8)); + LLVMSetInitializer (info_var, mono_llvm_create_constant_data_array (ctx->module->context, (uint8_t *) &objc_imageinfo, 8)); LLVMSetLinkage (info_var, LLVMPrivateLinkage); LLVMSetExternallyInitialized (info_var, TRUE); LLVMSetSection (info_var, "__DATA, __objc_imageinfo,regular,no_dead_strip"); @@ -8091,7 +8094,7 @@ MONO_RESTORE_WARNING LLVMTypeRef name_var_type = LLVMArrayType (LLVMInt8Type (), (unsigned int)(strlen (name) + 1)); LLVMValueRef name_var = LLVMAddGlobal (ctx->lmodule, name_var_type, "@OBJC_METH_VAR_NAME_"); - LLVMSetInitializer (name_var, mono_llvm_create_constant_data_array ((const uint8_t*)name, (int)(strlen (name) + 1))); + LLVMSetInitializer (name_var, mono_llvm_create_constant_data_array (ctx->module->context, (const uint8_t*)name, (int)(strlen (name) + 1))); LLVMSetLinkage (name_var, LLVMPrivateLinkage); LLVMSetSection (name_var, "__TEXT,__objc_methname,cstring_literals"); mark_as_used (ctx->module, name_var); @@ -13619,7 +13622,7 @@ emit_method_inner (EmitContext *ctx) LLVMValueRef name_var = LLVMAddGlobal (ctx->lmodule, type, "missing_method_name"); LLVMSetVisibility (name_var, LLVMHiddenVisibility); LLVMSetLinkage (name_var, LLVMInternalLinkage); - LLVMSetInitializer (name_var, mono_llvm_create_constant_data_array ((guint8*)name, len + 1)); + LLVMSetInitializer (name_var, mono_llvm_create_constant_data_array (ctx->module->context, (guint8*)name, len + 1)); mono_llvm_set_is_constant (name_var); g_free (name); @@ -14058,7 +14061,7 @@ add_types (MonoLLVMModule *module) void mono_llvm_init (gboolean enable_jit) { - ptr_t = mono_llvm_get_ptr_type (); + ptr_t = mono_llvm_get_ptr_type (LLVMGetGlobalContext ()); intrin_types [0][0] = i1_t = LLVMInt8Type (); intrin_types [0][1] = i2_t = LLVMInt16Type (); @@ -14469,7 +14472,7 @@ mono_llvm_emit_aot_data_aligned (const char *symbol, guint8 *data, int data_len, d = LLVMAddGlobal (module->lmodule, type, symbol); LLVMSetVisibility (d, LLVMHiddenVisibility); LLVMSetLinkage (d, LLVMInternalLinkage); - LLVMSetInitializer (d, mono_llvm_create_constant_data_array (data, data_len)); + LLVMSetInitializer (d, mono_llvm_create_constant_data_array (module->context, data, data_len)); if (align != 1) LLVMSetAlignment (d, align); mono_llvm_set_is_constant (d); @@ -14911,7 +14914,7 @@ mono_llvm_emit_aot_module (const char *filename, const char *cu_name) LLVMDeleteGlobal (cfg->llvm_dummy_info_var); } else { // FIXME: How can this happen ? - LLVMSetInitializer (cfg->llvm_dummy_info_var, mono_llvm_create_constant_data_array (NULL, 0)); + LLVMSetInitializer (cfg->llvm_dummy_info_var, mono_llvm_create_constant_data_array (module->context, NULL, 0)); } } } @@ -15447,3 +15450,5 @@ MonoCPUFeatures mono_llvm_get_cpu_features (void) return cpu_features; } + +#pragma GCC diagnostic pop