From 42d2967bd0e05dadd472264e8cd627ff589e5d4b Mon Sep 17 00:00:00 2001 From: Joseph Shields Date: Mon, 18 May 2020 14:29:38 -0400 Subject: [PATCH] Revert "Disable LLVM, loadedllvm is dead upstream" This reverts commit 64a34572b9f05ef5bc27ffce566817b3c3f670a6 [formerly ea9992b951f20ed31fe080d1b8f27ac4eaf6ba78]. Former-commit-id: 0954a3e617a8347a7b6727b4f3af74a776dd400a --- debian/control.REMOVED.git-id | 2 +- debian/libmono-llvm.symbols | 90 ++++++++++++++++++++++++++++++++ debian/mono-llvm-support.install | 1 + debian/patches/series | 2 +- debian/postinst-monoaot | 16 +++++- debian/rules | 4 ++ 6 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 debian/libmono-llvm.symbols create mode 100644 debian/mono-llvm-support.install diff --git a/debian/control.REMOVED.git-id b/debian/control.REMOVED.git-id index 41954b613b..67e37603f1 100644 --- a/debian/control.REMOVED.git-id +++ b/debian/control.REMOVED.git-id @@ -1 +1 @@ -2399a9d1856c34a4de37a7e326581b5076a09d96 \ No newline at end of file +7c6caa39c051a3addcd4a56bfa726d5d000b11a5 \ No newline at end of file diff --git a/debian/libmono-llvm.symbols b/debian/libmono-llvm.symbols new file mode 100644 index 0000000000..69db8eff54 --- /dev/null +++ b/debian/libmono-llvm.symbols @@ -0,0 +1,90 @@ + mini_exception_id_by_name@Base 6.4.0.137 + mini_get_underlying_type@Base 5.14.0.87 + mini_ins_info@Base 6.8.0.73 + mini_is_gsharedvt_klass@Base 5.14.0.87 + mini_is_gsharedvt_variable_klass@Base 5.14.0.87 + mini_is_gsharedvt_variable_signature@Base 6.4.0.137 + mini_is_gsharedvt_variable_type@Base 5.14.0.87 + mini_method_is_default_method@Base 6.4.0.137 + mini_native_type_replace_type@Base 5.14.0.87 + mini_type_is_hfa@Base 5.14.0.87 + mini_type_is_vtype@Base 5.14.0.87 + mini_type_var_is_vt@Base 5.14.0.87 + mono_add_patch_info@Base 5.14.0.87 + mono_add_patch_info_rel@Base 5.14.0.87 + mono_alloc_freg@Base 5.14.0.87 + mono_alloc_ireg@Base 5.14.0.87 + mono_alloc_ireg_copy@Base 5.14.0.87 + mono_alloc_ireg_mp@Base 5.14.0.87 + mono_alloc_ireg_ref@Base 5.14.0.87 + mono_alloc_lreg@Base 5.14.0.87 + mono_alloc_preg@Base 5.14.0.87 + mono_aot_can_specialize@Base 6.4.0.137 + mono_aot_can_enter_interp@Base 6.8.0.73 + mono_aot_get_direct_call_symbol@Base 5.14.0.87 + mono_aot_get_got_offset@Base 5.14.0.87 + mono_aot_get_mangled_method_name@Base 5.14.0.87 + mono_aot_get_method_index@Base 5.14.0.87 + mono_aot_get_method_name@Base 5.14.0.87 + mono_aot_get_plt_symbol@Base 5.14.0.87 + mono_aot_is_direct_callable@Base 5.14.0.87 + mono_aot_is_shared_got_offset@Base 5.14.0.87 + mono_aot_mark_unused_llvm_plt_entry@Base 5.14.0.87 + mono_aot_patch_info_dup@Base 5.14.0.87 + mono_arch_create_vars@Base 5.14.0.87 + mono_bblock_add_inst@Base 5.14.0.87 + mono_call_inst_add_outarg_reg@Base 5.14.0.87 + mono_class_enum_basetype_internal@Base 6.4.0.137 + mono_class_get_cctor@Base 5.14.0.87 + mono_class_get_generic_class@Base 6.4.0.137 + mono_class_load_from_name@Base 5.14.0.87 + mono_compile_create_var@Base 6.4.0.137 + mono_create_jit_trampoline@Base 5.14.0.87 + mono_debug_get_seq_points@Base 6.4.0.137 + mono_dl_close@Base 5.14.0.87 + mono_dl_open@Base 5.8.0.22 + mono_dl_symbol@Base 5.14.0.87 + mono_domain_code_reserve@Base 5.14.0.87 + mono_domain_lock@Base 5.14.0.87 + mono_domain_unlock@Base 5.14.0.87 + mono_get_block_region_notry@Base 5.14.0.87 + mono_get_jit_icall_info@Base 6.4.0.137 + mono_icall_get_wrapper@Base 5.14.0.87 + mono_icall_get_wrapper_full@Base 6.4.0.137 + mono_icall_get_wrapper_method@Base 6.0.0.172 + mono_inst_name@Base 5.14.0.87 + mono_is_power_of_two@Base 5.14.0.87 + mono_ji_type_to_string@Base 5.14.0.87 + mono_jit_compile_method@Base 6.8.0.73 + mono_llvm_check_method_supported@Base 5.14.0.87 + mono_llvm_cleanup@Base 5.14.0.87 + mono_llvm_create_aot_module@Base 5.14.0.87 + mono_llvm_create_vars@Base 5.14.0.87 + mono_llvm_emit_aot_data@Base 5.14.0.87 + mono_llvm_emit_aot_file_info@Base 5.14.0.87 + mono_llvm_emit_aot_module@Base 5.14.0.87 + mono_llvm_emit_call@Base 5.14.0.87 + mono_llvm_emit_method@Base 5.14.0.87 + mono_llvm_fixup_aot_module@Base 6.0.0.172 + mono_llvm_free_domain_info@Base 5.14.0.87 + mono_llvm_get_cpu_features@Base 6.10.0.52 + mono_llvm_init@Base 5.14.0.87 + mono_loader_lock@Base 5.14.0.87 + mono_loader_unlock@Base 5.14.0.87 + mono_marshal_find_nonzero_bit_offset@Base 5.14.0.87 + mono_marshal_get_aot_init_wrapper@Base 6.4.0.137 + mono_marshal_get_aot_init_wrapper_name@Base 6.4.0.137 + mono_marshal_get_llvm_func_wrapper@Base 6.8.0.73 + mono_marshal_get_wrapper_info@Base 5.20.1.10 + mono_opcode_to_cond@Base 5.14.0.87 + mono_patch_info_equal@Base 6.4.0.137 + mono_patch_info_hash@Base 6.4.0.137 + mono_print_ins@Base 6.4.0.137 + mono_print_unwind_info@Base 5.14.0.87 + mono_resolve_patch_target@Base 5.14.0.87 + mono_resume_unwind@Base 5.14.0.87 + mono_rgctx_info_type_to_str@Base 6.4.0.137 + mono_threads_suspend_policy_hidden_dont_modify@Base 6.8.0.73 + mono_type_to_regmove@Base 5.14.0.87 + mono_unwind_decode_fde@Base 5.14.0.87 + mono_unwind_decode_llvm_mono_fde@Base 5.14.0.87 diff --git a/debian/mono-llvm-support.install b/debian/mono-llvm-support.install new file mode 100644 index 0000000000..3e3e21e450 --- /dev/null +++ b/debian/mono-llvm-support.install @@ -0,0 +1 @@ +/usr/lib/libmono-llvm.so* diff --git a/debian/patches/series b/debian/patches/series index d4ed4fb5dd..1a6409de55 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1 @@ -#llvm_llc_opt_default_path.patch +llvm_llc_opt_default_path.patch diff --git a/debian/postinst-monoaot b/debian/postinst-monoaot index 7bf7d80cc6..c359bb8eef 100644 --- a/debian/postinst-monoaot +++ b/debian/postinst-monoaot @@ -3,9 +3,21 @@ then TEMPDIR=`mktemp -d -t monoaot.XXXXXXXXX` MONOARCH=`mono --version | grep Architecture | sed 's/.*: //' | sed 's/el,.*//'` HASSSE41=`grep sse4_1 /proc/cpuinfo || true` - echo "Mono precompiling #FILE# for ${MONOARCH}..." + TRYLLVM="" + LLVMNOTE="" + if [ -e "/usr/lib/libmono-llvm.so.0" ] + then + TRYLLVM="try-llvm," + LLVMNOTE=" (trying with LLVM, this might take a few minutes)" + fi + if [ -z "$HASSSE41" ] + then + TRYLLVM="" + LLVMNOTE=" (LLVM disabled due to missing SSE4.1)" + fi + echo "Mono precompiling #FILE# for ${MONOARCH}${LLVMNOTE}..." mkdir -p /usr/lib/mono/aot-cache/${MONOARCH}/ - /usr/bin/mono --aot=temp-path=${TEMPDIR},outfile=/usr/lib/mono/aot-cache/${MONOARCH}/`basename #FILE#.so` -O=all #FILE# > /dev/null 2>&1 || true + /usr/bin/mono --aot=${TRYLLVM}temp-path=${TEMPDIR},outfile=/usr/lib/mono/aot-cache/${MONOARCH}/`basename #FILE#.so` -O=all #FILE# > /dev/null 2>&1 || true if [ -n "${TEMPDIR}" -a "${TEMPDIR}" != "/tmp" -a "${TEMPDIR}" != "/tmp/" -a "${TEMPDIR}" != "/" ] then rm -f ${TEMPDIR}/* diff --git a/debian/rules b/debian/rules index 1e7ee8773a..81d2a1cf5e 100755 --- a/debian/rules +++ b/debian/rules @@ -52,19 +52,23 @@ ifeq ($(DEB_HOST_ARCH), arm64) MONO_BOEHM_TEST = true CONF_FLAGS += --disable-boehm BTLS_ARCH = true + LLVM_ARCH = true SKIP_LIBGC = true endif ifeq ($(DEB_HOST_ARCH), i386) BTLS_ARCH = true + LLVM_ARCH = true endif ifeq ($(DEB_HOST_ARCH), armhf) BTLS_ARCH = true + LLVM_ARCH = true endif ifeq ($(DEB_HOST_ARCH), amd64) BTLS_ARCH = true + LLVM_ARCH = true endif ifeq ($(DEB_HOST_ARCH), ppc64el)