Fix the profiler runtime with compiler-rt-17
This commit is contained in:
parent
68e85e4428
commit
938db5293e
41
rust.spec
41
rust.spec
@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.72.1
|
Version: 1.72.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: The Rust Programming Language
|
Summary: The Rust Programming Language
|
||||||
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
|
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
|
||||||
# ^ written as: (rust itself) and (bundled libraries)
|
# ^ written as: (rust itself) and (bundled libraries)
|
||||||
@ -746,9 +746,14 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
# The exact profiler path is version dependent, and uses LLVM-specific
|
# Find the compiler-rt library for the Rust profiler_builtins crate.
|
||||||
# arch names in the filename, but this find is good enough for now...
|
%if 0%{?clang_major_version} >= 17
|
||||||
PROFILER=$(find %{_libdir}/clang -type f -name 'libclang_rt.profile-*.a')
|
PROFILER='%{clang_resource_dir}/lib/%{_arch}-redhat-linux-gnu/libclang_rt.profile.a'
|
||||||
|
%else
|
||||||
|
# The exact profiler path is version dependent..
|
||||||
|
PROFILER=$(echo %{_libdir}/clang/*/lib/libclang_rt.profile-%{_arch}.a)
|
||||||
|
%endif
|
||||||
|
test -r "$PROFILER"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%configure --disable-option-checking \
|
%configure --disable-option-checking \
|
||||||
@ -892,16 +897,23 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
|
|||||||
|
|
||||||
# Sanity-check the installed binaries, debuginfo-stripped and all.
|
# Sanity-check the installed binaries, debuginfo-stripped and all.
|
||||||
%{buildroot}%{_bindir}/cargo new build/hello-world
|
%{buildroot}%{_bindir}/cargo new build/hello-world
|
||||||
env RUSTC=%{buildroot}%{_bindir}/rustc \
|
(
|
||||||
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
|
cd build/hello-world
|
||||||
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml
|
export RUSTC=%{buildroot}%{_bindir}/rustc \
|
||||||
|
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH"
|
||||||
|
%{buildroot}%{_bindir}/cargo run --verbose
|
||||||
|
|
||||||
# Try a build sanity-check for other std-enabled targets
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
for triple in %{?mingw_targets} %{?wasm_targets}; do
|
# Sanity-check that code-coverage builds and runs
|
||||||
env RUSTC=%{buildroot}%{_bindir}/rustc \
|
env RUSTFLAGS="-Cinstrument-coverage" %{buildroot}%{_bindir}/cargo run --verbose
|
||||||
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
|
test -r default_*.profraw
|
||||||
%{buildroot}%{_bindir}/cargo build --manifest-path build/hello-world/Cargo.toml --target=$triple
|
%endif
|
||||||
done
|
|
||||||
|
# Try a build sanity-check for other std-enabled targets
|
||||||
|
for triple in %{?mingw_targets} %{?wasm_targets}; do
|
||||||
|
%{buildroot}%{_bindir}/cargo build --verbose --target=$triple
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
# The results are not stable on koji, so mask errors and just log it.
|
# The results are not stable on koji, so mask errors and just log it.
|
||||||
# Some of the larger test artifacts are manually cleaned to save space.
|
# Some of the larger test artifacts are manually cleaned to save space.
|
||||||
@ -1062,6 +1074,9 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 27 2023 Josh Stone <jistone@redhat.com> - 1.72.1-3
|
||||||
|
- Fix the profiler runtime with compiler-rt-17
|
||||||
|
|
||||||
* Mon Sep 25 2023 Josh Stone <jistone@redhat.com> - 1.72.1-2
|
* Mon Sep 25 2023 Josh Stone <jistone@redhat.com> - 1.72.1-2
|
||||||
- Fix LLVM dependency for ELN
|
- Fix LLVM dependency for ELN
|
||||||
- Add build target for x86_64-unknown-none
|
- Add build target for x86_64-unknown-none
|
||||||
|
Loading…
Reference in New Issue
Block a user