Rename x/xk macros for older rpm compat
This commit is contained in:
parent
162f7919e2
commit
6f2eb1990e
32
rust.spec
32
rust.spec
@ -735,32 +735,32 @@ test -r "%{profiler}"
|
|||||||
--release-channel=%{channel} \
|
--release-channel=%{channel} \
|
||||||
--release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
|
--release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
|
||||||
|
|
||||||
%global x %{__python3} ./x.py
|
%global __x %{__python3} ./x.py
|
||||||
%global xk %{x} --keep-stage=0 --keep-stage=1
|
%global __xk %{__x} --keep-stage=0 --keep-stage=1
|
||||||
|
|
||||||
%if %with rustc_pgo
|
%if %with rustc_pgo
|
||||||
# Build the compiler with profile instrumentation
|
# Build the compiler with profile instrumentation
|
||||||
PROFRAW="$PWD/build/profiles"
|
PROFRAW="$PWD/build/profiles"
|
||||||
PROFDATA="$PWD/build/rustc.profdata"
|
PROFDATA="$PWD/build/rustc.profdata"
|
||||||
mkdir -p "$PROFRAW"
|
mkdir -p "$PROFRAW"
|
||||||
%{x} build -j "$ncpus" sysroot --rust-profile-generate="$PROFRAW"
|
%{__x} build -j "$ncpus" sysroot --rust-profile-generate="$PROFRAW"
|
||||||
# Build cargo as a workload to generate compiler profiles
|
# Build cargo as a workload to generate compiler profiles
|
||||||
env LLVM_PROFILE_FILE="$PROFRAW/default_%%m_%%p.profraw" %{xk} build cargo
|
env LLVM_PROFILE_FILE="$PROFRAW/default_%%m_%%p.profraw" %{__xk} build cargo
|
||||||
llvm-profdata merge -o "$PROFDATA" "$PROFRAW"
|
llvm-profdata merge -o "$PROFDATA" "$PROFRAW"
|
||||||
rm -r "$PROFRAW" build/%{rust_triple}/stage2*/
|
rm -r "$PROFRAW" build/%{rust_triple}/stage2*/
|
||||||
# Rebuild the compiler using the profile data
|
# Rebuild the compiler using the profile data
|
||||||
%{x} build -j "$ncpus" sysroot --rust-profile-use="$PROFDATA"
|
%{__x} build -j "$ncpus" sysroot --rust-profile-use="$PROFDATA"
|
||||||
%else
|
%else
|
||||||
# Build the compiler without PGO
|
# Build the compiler without PGO
|
||||||
%{x} build -j "$ncpus" sysroot
|
%{__x} build -j "$ncpus" sysroot
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Build everything else normally
|
# Build everything else normally
|
||||||
%{xk} build
|
%{__xk} build
|
||||||
%{xk} doc
|
%{__xk} doc
|
||||||
|
|
||||||
for triple in %{?all_targets} ; do
|
for triple in %{?all_targets} ; do
|
||||||
%{xk} build --target=$triple std
|
%{__xk} build --target=$triple std
|
||||||
done
|
done
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -769,10 +769,10 @@ done
|
|||||||
%endif
|
%endif
|
||||||
%{export_rust_env}
|
%{export_rust_env}
|
||||||
|
|
||||||
DESTDIR=%{buildroot} %{xk} install
|
DESTDIR=%{buildroot} %{__xk} install
|
||||||
|
|
||||||
for triple in %{?all_targets} ; do
|
for triple in %{?all_targets} ; do
|
||||||
DESTDIR=%{buildroot} %{xk} install --target=$triple std
|
DESTDIR=%{buildroot} %{__xk} install --target=$triple std
|
||||||
done
|
done
|
||||||
|
|
||||||
# The rls stub doesn't have an install target, but we can just copy it.
|
# The rls stub doesn't have an install target, but we can just copy it.
|
||||||
@ -882,17 +882,17 @@ rm -rf "$TMP_HELLO"
|
|||||||
|
|
||||||
# Bootstrap is excluded because it's not something we ship, and a lot of its
|
# Bootstrap is excluded because it's not something we ship, and a lot of its
|
||||||
# tests are geared toward the upstream CI environment.
|
# tests are geared toward the upstream CI environment.
|
||||||
%{xk} test --no-fail-fast --skip src/bootstrap || :
|
%{__xk} test --no-fail-fast --skip src/bootstrap || :
|
||||||
rm -rf "./build/%{rust_triple}/test/"
|
rm -rf "./build/%{rust_triple}/test/"
|
||||||
|
|
||||||
%{xk} test --no-fail-fast cargo || :
|
%{__xk} test --no-fail-fast cargo || :
|
||||||
rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
||||||
|
|
||||||
%{xk} test --no-fail-fast clippy || :
|
%{__xk} test --no-fail-fast clippy || :
|
||||||
|
|
||||||
%{xk} test --no-fail-fast rust-analyzer || :
|
%{__xk} test --no-fail-fast rust-analyzer || :
|
||||||
|
|
||||||
%{xk} test --no-fail-fast rustfmt || :
|
%{__xk} test --no-fail-fast rustfmt || :
|
||||||
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
Loading…
Reference in New Issue
Block a user