2 Commits

Author SHA1 Message Date
f9638ce9c8 Split builds for core library and tensile modules
Build and package core library and arch dependent
tensile modules separately to parallelize the build.
Add:
Modify-CMakeLists.txt-files-to-allow-to-build-modules-independently.patch

Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-13 11:48:10 +02:00
c78f006f1c Fix buildinfo and compiler flags handling for SUSE
When building without debug support, remove `-g` flag
from compiler arguments.
Also make sure the %build_cxxflags macro is used. SUSE
doesn't use it by default.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-11 16:51:42 +02:00

View File

@@ -23,11 +23,18 @@
%global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/' -e 's/-mtls-dialect=gnu2//')
%bcond_with debug
%if 0%{?suse_version}
%if %{without debug}
%global build_type RELEASE
%global build_cxxflags %(echo %{optflags} | sed -e 's/-g\\( \\|$\\)/ /')
%endif
%else
%if %{with debug}
%global build_type DEBUG
%else
%global build_type RELEASE
%endif
%endif
%bcond_without compress
%if %{with compress}
@@ -101,7 +108,7 @@
-DCMAKE_LINKER=%rocmllvm_bindir/ld.lld \\\
-DCMAKE_AR=%rocmllvm_bindir/llvm-ar \\\
-DCMAKE_RANLIB=%rocmllvm_bindir/llvm-ranlib \\\
-DCMAKE_BUILD_TYPE=%{build_type} \\\
%{?build_type:-DCMAKE_BUILD_TYPE=%{build_type}} \\\
-DCMAKE_PREFIX_PATH=%{rocmllvm_cmakedir}/.. \\\
-DCMAKE_SKIP_RPATH=ON \\\
-DCMAKE_VERBOSE_MAKEFILE=ON \\\
@@ -316,6 +323,7 @@ fi
export TENSILE_SKIP_LIBRARY=true
%endif
%{?suse_version:%{?build_cxxflags:CXXFLAGS="%{build_cxxflags}"}}
%cmake %{cmake_generator} %{cmake_config} \
-DGPU_TARGETS=%{gpu_list} \
-DBUILD_WITH_TENSILE=%{build_tensile} \
@@ -396,6 +404,7 @@ export LD_LIBRARY_PATH=%{_vpath_builddir}/library/src:$LD_LIBRARY_PATH
- Enable msgpack on SUSE, restructure build requires and build settings.
- Consoldiate Python module BuildRequires for SUSE.
- Restructure tensile verbosity option.
- Fix buildinfo and compiler flags handling for SUSE.
- Build and package core library and arch dependent
tensile modules separately to parallelize the build.
Add: Modify-CMakeLists.txt-files-to-allow-to-build-modules-independently.patch