332 |
%if %defined mingw_targets |
%if %defined mingw_targets |
333 |
BuildRequires: mingw32-filesystem >= 95 |
BuildRequires: mingw32-filesystem >= 95 |
334 |
BuildRequires: mingw64-filesystem >= 95 |
BuildRequires: mingw64-filesystem >= 95 |
335 |
|
BuildRequires: mingw32-crt |
336 |
|
BuildRequires: mingw64-crt |
337 |
BuildRequires: mingw32-gcc |
BuildRequires: mingw32-gcc |
338 |
BuildRequires: mingw64-gcc |
BuildRequires: mingw64-gcc |
339 |
|
BuildRequires: mingw32-winpthreads-static |
340 |
|
BuildRequires: mingw64-winpthreads-static |
341 |
%endif |
%endif |
342 |
|
|
343 |
%if %defined wasm_targets |
%if %defined wasm_targets |
344 |
BuildRequires: clang |
BuildRequires: clang |
345 |
|
BuildRequires: lld |
346 |
# brp-strip-static-archive breaks the archive index for wasm |
# brp-strip-static-archive breaks the archive index for wasm |
347 |
%global __os_install_post \ |
%global __os_install_post \ |
348 |
%__os_install_post \ |
%__os_install_post \ |
349 |
find '%{buildroot}%{rustlibdir}' -type f -path '*/wasm*/lib/*.rlib' -print -exec '%{llvm_root}/bin/llvm-ranlib' '{}' ';' \ |
find '%{buildroot}%{rustlibdir}'/wasm*/lib -type f -regex '.*\\.\\(a\\|rlib\\)' -print -exec '%{llvm_root}/bin/llvm-ranlib' '{}' ';' \ |
350 |
%{nil} |
%{nil} |
351 |
%endif |
%endif |
352 |
|
|
852 |
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \ |
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \ |
853 |
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml |
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml |
854 |
|
|
855 |
|
# Try a build sanity-check for other targets |
856 |
|
for triple in %{?mingw_targets} %{?wasm_targets}; do |
857 |
|
env RUSTC=%{buildroot}%{_bindir}/rustc \ |
858 |
|
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \ |
859 |
|
%{buildroot}%{_bindir}/cargo build --manifest-path build/hello-world/Cargo.toml --target=$triple |
860 |
|
done |
861 |
|
|
862 |
# 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. |
863 |
# Some of the larger test artifacts are manually cleaned to save space. |
# Some of the larger test artifacts are manually cleaned to save space. |
864 |
%{__python3} ./x.py test --no-fail-fast --stage 2 || : |
%{__python3} ./x.py test --no-fail-fast --stage 2 || : |