mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2025-12-29 15:10:15 +00:00
revbump(main/rust): after LLVM 19 update (#21566)
This commit is contained in:
33
packages/rust/0006-llvm-19.patch
Normal file
33
packages/rust/0006-llvm-19.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
Cherry picked from https://github.com/rust-lang/rust/pull/127513
|
||||
|
||||
From 00bfd702dc8c3b760b4f965fd059a5f1db8bb2b1 Mon Sep 17 00:00:00 2001
|
||||
From: Krasimir Georgiev <krasimir@google.com>
|
||||
Date: Mon, 17 Jun 2024 09:35:38 +0000
|
||||
Subject: [PATCH 2/4] Disable MC/DC tests on LLVM 19
|
||||
|
||||
Disable the tests and generate an error if MC/DC is used on LLVM 19.
|
||||
The support will be ported separately, as it is substantially
|
||||
different on LLVM 19, and there are no plans to support both
|
||||
versions.
|
||||
---
|
||||
compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 2 +-
|
||||
tests/coverage/mcdc/condition-limit.rs | 1 +
|
||||
tests/coverage/mcdc/if.rs | 1 +
|
||||
tests/coverage/mcdc/inlined_expressions.rs | 1 +
|
||||
tests/coverage/mcdc/nested_if.rs | 1 +
|
||||
tests/coverage/mcdc/non_control_flow.rs | 1 +
|
||||
6 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||
index 4cdd8af1008c0..2ff7335a0fc81 100644
|
||||
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||
@@ -1555,7 +1555,7 @@ LLVMRustGetInstrProfMCDCTVBitmapUpdateIntrinsic(LLVMModuleRef M) {
|
||||
|
||||
extern "C" LLVMValueRef
|
||||
LLVMRustGetInstrProfMCDCCondBitmapIntrinsic(LLVMModuleRef M) {
|
||||
-#if LLVM_VERSION_GE(18, 0)
|
||||
+#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0)
|
||||
return wrap(llvm::Intrinsic::getDeclaration(
|
||||
unwrap(M), llvm::Intrinsic::instrprof_mcdc_condbitmap_update));
|
||||
#else
|
||||
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Systems programming language focused on safety, speed an
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="1.81.0"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-${TERMUX_PKG_VERSION}-src.tar.xz
|
||||
TERMUX_PKG_SHA256=36217ef7e32f40a180e3d79bd666b4dfdaed49dd381023a5fb765fd12d0092ce
|
||||
_LLVM_MAJOR_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo $LLVM_MAJOR_VERSION)
|
||||
@@ -32,7 +33,7 @@ termux_pkg_auto_update() {
|
||||
local api_url2="https://forge.rust-lang.org/infra/other-installation-methods.html"
|
||||
local api_url1_r=$(curl -Ls "${api_url1}")
|
||||
local api_url2_r=$(curl -Ls "${api_url2}")
|
||||
local latest_version=$(echo "${api_url1_r}" | grep "html" | sed -ne "s|.*Stable: \([0-9]*\+.\+[0-9]*\+.\+[0-9]*\) Beta:.*|\1|p")
|
||||
local latest_version=$(echo "${api_url1_r}" | sed -ne "s|.*Stable: \([0-9]*\+.\+[0-9]*\+.\+[0-9]*\) Beta:.*|\1|p")
|
||||
if [[ "${latest_version}" == "${TERMUX_PKG_VERSION}" ]]; then
|
||||
echo "INFO: Already up to date."
|
||||
return
|
||||
@@ -48,7 +49,7 @@ termux_pkg_auto_update() {
|
||||
|
||||
local uptime_now=$(cat /proc/uptime)
|
||||
local uptime_s="${uptime_now//.*}"
|
||||
local uptime_h_limit=4
|
||||
local uptime_h_limit=2
|
||||
local uptime_s_limit=$((uptime_h_limit*60*60))
|
||||
[[ -z "${uptime_s}" ]] && [[ "$(uname -o)" != "Android" ]] && e=1
|
||||
[[ "${uptime_s}" == 0 ]] && [[ "$(uname -o)" != "Android" ]] && e=1
|
||||
@@ -132,7 +133,7 @@ termux_step_configure() {
|
||||
# like 30 to 40 + minutes ... so lets get it right
|
||||
|
||||
# upstream tests build using versions N and N-1
|
||||
local BOOTSTRAP_VERSION=1.80.0
|
||||
local BOOTSTRAP_VERSION=1.80.1
|
||||
if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]]; then
|
||||
if ! rustup install "${BOOTSTRAP_VERSION}"; then
|
||||
echo "WARN: ${BOOTSTRAP_VERSION} is unavailable, fallback to stable version!"
|
||||
|
||||
Reference in New Issue
Block a user