# Build Order of ROCM Stack # rocm-cmake, rocm-llvm (Can be build simultaneously) ## rocm-runtime, rocm-core (Can be build simultaneously) ### rocminfo, rocm-amd-opencl (Can be build simultaneously) #Build Time of this package ~ 61 minutes 6 seconds %ifarch x86_64 # FOR LATER: %%global targets_to_build "X86;AMDGPU;NVPTX;AArch64;ARM;BPF;WebAssembly" %global targets_to_build "X86;AMDGPU;NVPTX" %endif %ifarch aarch64 # FOR LATER %%global targets_to_build "AArch64;ARM;AMDGPU;NVPTX;BPF" %global targets_to_build "AArch64;AMDGPU;NVPTX" %endif # Upstream tags are based on rocm releases: %global rocm_release 6.4 %global rocm_patch 3 %global rocm_version %{rocm_release}.%{rocm_patch} %global forgeurl https://github.com/RadeonOpenCompute/llvm-project # What LLVM is upstream using (use LLVM_VERSION_MAJOR from llvm/CMakeLists.txt): %define llvm_major 19 %define libname %mklibname %{name} %{llvm_major} %define develname %mklibname %{name} -d %global bundle_prefix %{_libdir}/rocm-%{rocm_release} %global amd_device_libs_prefix lib/clang/%{llvm_major} %global optflags %{optflags} -fPIC %bcond_without build_with_rocm_tools %if %{with build_with_rocm_tools} %global __requires_exclude_from %{bundle_prefix} %endif # upstream will remove perl support of hipcc # We not install in standar path so don'nt know if works %bcond_with perl Name: rocm-llvm Version: %{rocm_version} Release: %mkrel 1 Summary: Various AMD ROCm-LLVM related packages Group: Development/Other Url: https://rocm.docs.amd.com/en/latest/reference/rocmcc/rocmcc.html License: Apache-2.0 WITH LLVM-exception Source0: %{forgeurl}/archive/rocm-%{version}.tar.gz#/llvm-project-rocm-%{version}.tar.gz Source1: rocm-mga.prep.in Patch0: llvm%{llvm_major}-detect-mageia.patch #Fedora Patch3: 0001-Remove-err_drv_duplicate_config-check.patch Patch4: 0001-Replace-use-of-mktemp-with-mkstemp.patch # Subject: [PATCH] [gold] Fix compilation (#130334) Patch5: %{url}/commit/b0baa1d8bd68a2ce2f7c5f2b62333e410e9122a1.patch # Link comgr with static versions of llvm's libraries Patch6: 0001-comgr-link-with-static-llvm.patch Patch7: 0001-rocm-llvm-work-around-new-assert-in-array.patch #Arch Linux # Fix build with cmake 4.0 Patch100: %{url}/commit/a18cc4c7cb51f94182b6018c7c73acde1b8ebddb.patch # Add fix for missing function overload (openat) # https://github.com/llvm/llvm-project/issues/100754 Patch101: %{url}/commit/155b7a12820ec45095988b6aa6e057afaf2bc892.patch #Based on Alt linux patch Patch200: hipcc-remove-stdc++fs.patch BuildRequires: binutils-devel BuildRequires: clang BuildRequires: cmake BuildRequires: glibc-devel BuildRequires: lld BuildRequires: ninja-build BuildRequires: python3 # for %%py3_shebang_fix BuildRequires: python3-devel BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libedit) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(valgrind) BuildRequires: pkgconfig(zlib) #BuildRequires: rocm-core? #Only the following architectures are useful for ROCm packages: ExclusiveArch: x86_64 aarch64 %description Radeon Open Compute ROCm-LLVM toolchain (llvm, clang, lld) %package -n rocm%{rocm_release}-macros Summary: ROCm Compiler RPM macros BuildArch: noarch %description -n rocm%{rocm_release}-macros This package contains ROCm compiler related RPM macros. %package -n rocm%{rocm_release}-device-libs Summary: AMD ROCm LLVM bit code libraries Requires: rocm%{rocm_release}-clang-devel Requires: rocm%{rocm_release}-llvm-static Requires: rocm%{rocm_release}-lld %description -n rocm%{rocm_release}-device-libs This package contains a set of AMD specific device-side language runtime libraries in the form of bit code. Specifically: - Open Compute library controls - Open Compute Math library - Open Compute Kernel library - OpenCL built-in library - HIP built-in library - Heterogeneous Compute built-in library %package -n rocm%{rocm_release}-comgr Summary: AMD ROCm LLVM Code Object Manager %description -n rocm%{rocm_release}-comgr The AMD Code Object Manager (Comgr) is a shared library which provides operations for creating and inspecting code objects. %post -n rocm%{rocm_release}-comgr -p /sbin/ldconfig %postun -n rocm%{rocm_release}-comgr -p /sbin/ldconfig %package -n rocm%{rocm_release}-comgr-devel Summary: AMD ROCm LLVM Code Object Manager Requires: rocm%{rocm_release}-comgr%{?_isa} = %{version}-%{release} Requires: rocm%{rocm_release}-device-libs %description -n rocm%{rocm_release}-comgr-devel The AMD Code Object Manager (Comgr) development package. %package -n rocm%{rocm_release}-hipcc Summary: HIP compiler driver Requires: perl-base Requires: rocm%{rocm_release}-device-libs = %{version}-%{release} #Check if we have/need Suggests: rocminfo %description -n rocm%{rocm_release}-hipcc hipcc is a compiler driver utility that will call clang or nvcc, depending on target, and pass the appropriate include and library options for the target compiler and HIP infrastructure. hipcc will pass-through options to the target compiler. The tools calling hipcc must ensure the compiler options are appropriate for the target compiler. %package -n rocm%{rocm_release}-hipcc-libomp-devel Summary: OpenMP header files for hipcc Requires: rocm%{rocm_release}-hipcc = %{version}-%{release} Requires: libomp-devel %description -n rocm%{rocm_release}-hipcc-libomp-devel OpenMP header files compatible with HIPCC. # ROCM LLVM %package -n rocm%{rocm_release}-llvm-filesystem Summary: Filesystem package that owns the rocm llvm directory %description -n rocm%{rocm_release}-llvm-filesystem This package owns the rocm llvm directory : %{bundle_prefix} %package -n rocm%{rocm_release}-llvm-libs Summary: The ROCm LLVM lib Requires: rocm%{rocm_release}-llvm-filesystem%{?_isa} = %{version}-%{release} Requires: rocm%{rocm_release}-libc++%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-llvm-libs %{summary} %package -n rocm%{rocm_release}-llvm Summary: The ROCm LLVM Requires: rocm%{rocm_release}-llvm-libs%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-llvm %{summary} %package -n rocm%{rocm_release}-llvm-devel Summary: Libraries and header files for ROCm LLVM Requires: rocm%{rocm_release}-llvm%{?_isa} = %{version}-%{release} Requires: zlib-devel %description -n rocm%{rocm_release}-llvm-devel %{summary} %post -n rocm%{rocm_release}-llvm-devel -p /sbin/ldconfig %postun -n rocm%{rocm_release}-llvm-devel -p /sbin/ldconfig %package -n rocm%{rocm_release}-llvm-static Summary: Static libraries for ROCm LLVM Requires: rocm%{rocm_release}-llvm-devel%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-llvm-static %{summary} # ROCM CLANG %package -n rocm%{rocm_release}-clang-libs Summary: The ROCm compiler libs Requires: rocm%{rocm_release}-llvm-libs%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-clang-libs %{summary} %post -n rocm%{rocm_release}-clang-libs -p /sbin/ldconfig %postun -n rocm%{rocm_release}-clang-libs -p /sbin/ldconfig %package -n rocm%{rocm_release}-clang-runtime-devel Summary: The ROCm compiler runtime %description -n rocm%{rocm_release}-clang-runtime-devel %{summary} %package -n rocm%{rocm_release}-clang Summary: The ROCm compiler Requires: git Requires: python3 Requires: rocm%{rocm_release}-clang-libs%{?_isa} = %{version}-%{release} Requires: rocm%{rocm_release}-clang-runtime-devel%{?_isa} = %{version}-%{release} Requires: rocm%{rocm_release}-libc++-devel%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-clang %{summary} %package -n rocm%{rocm_release}-clang-devel Summary: Libraries and header files for ROCm CLANG Requires: rocm%{rocm_release}-clang%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-clang-devel %{summary} # CLANG TOOLS EXTRA %package -n rocm%{rocm_release}-clang-tools-extra Summary: Extra tools for clang Requires: rocm%{rocm_release}-clang-libs%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-clang-tools-extra A set of extra tools built using Clang tooling API. %package -n rocm%{rocm_release}-clang-tools-extra-devel Summary: Development header files for clang tools Requires: rocm%{rocm_release}-clang-tools-extra = %{version}-%{release} %description -n rocm%{rocm_release}-clang-tools-extra-devel Development header files for clang tools. # ROCM LLD %package -n rocm%{rocm_release}-lld Summary: The ROCm Linker Requires: rocm%{rocm_release}-llvm-libs%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-lld %{summary} # ROCM LIBC++ %package -n rocm%{rocm_release}-libc++ Summary: The ROCm libc++ Requires: rocm%{rocm_release}-llvm-filesystem%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-libc++ %{summary} %package -n rocm%{rocm_release}-libc++-devel Summary: The ROCm libc++ libraries and headers Requires: rocm%{rocm_release}-libc++%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-libc++-devel %{summary} %package -n rocm%{rocm_release}-libc++-static Summary: The ROCm libc++ static libraries Requires: rocm%{rocm_release}-libc++-devel%{?_isa} = %{version}-%{release} %description -n rocm%{rocm_release}-libc++-static %{summary} %prep %autosetup -p1 -n llvm-project-rocm-%{version} %py3_shebang_fix \ llvm/tools/opt-viewer/*.py \ clang/tools/scan-view/bin/scan-view #Taked from Fedora %global llvm_projects "clang;clang-tools-extra;lld" %global llvm_runtimes "compiler-rt;libcxx;libcxxabi" # rm llvm-project bits we do not need rm -rf {bolt,flang,libc,libclc,lldb,llvm-libgcc,mlir,polly} #Force static linking of libclang in comgr sed -i "s/TARGET clangFrontendTool/true/" amd/comgr/CMakeLists.txt install -pm 755 %{SOURCE1} prep.sh . ./prep.sh #Macros CLANG_VERSION=%llvm_major LLVM_BINDIR=%{bundle_prefix}/bin LLVM_LIBDIR=%{bundle_prefix}/lib LLVM_CMAKEDIR=%{bundle_prefix}/lib/cmake/llvm echo "%%rocm_release %{rocm_release}" > macros.rocmcompiler echo "%%rocm_patch %{rocm_patch}" >> macros.rocmcompiler echo "%%rocm_prefix %%_libdir/rocm-%%rocm_release" >> macros.rocmcompiler echo "%%rocmllvm_version $CLANG_VERSION" >> macros.rocmcompiler echo "%%rocmllvm_bindir $LLVM_BINDIR" >> macros.rocmcompiler echo "%%rocmllvm_libdir $LLVM_LIBDIR" >> macros.rocmcompiler echo "%%rocmllvm_cmakedir $LLVM_CMAKEDIR" >> macros.rocmcompiler %build #Taked from Fedora # Real cores, No hyperthreading COMPILE_JOBS=`cat /proc/cpuinfo | grep -m 1 'cpu cores' | awk '{ print $4 }'` if [ ${COMPILE_JOBS}x = x ]; then COMPILE_JOBS=1 fi # Take into account memmory usage per core, do not thrash real memory LINK_MEM=4 MEM_KB=`cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'` MEM_MB=`eval "expr ${MEM_KB} / 1024"` MEM_GB=`eval "expr ${MEM_MB} / 1024"` LINK_JOBS=`eval "expr 1 + ${MEM_GB} / ${LINK_MEM}"` JOBS=${COMPILE_JOBS} if [ "$LINK_JOBS" -lt "$JOBS" ]; then JOBS=$LINK_JOBS fi #Use arrays, inspired by Arch Linux llvmrocm_cmake_config=( -G Ninja -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DCLANG_ENABLE_ARCMT=OFF -DCLANG_TOOL_CLANG_FUZZER_BUILD=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_DO_STRIP=ON -DCMAKE_INSTALL_PREFIX=%{bundle_prefix} -DCOMPILER_RT_BUILD_BUILTINS=ON -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF -DCOMPILER_RT_BUILD_GWP_ASAN=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DCOMPILER_RT_BUILD_MEMPROF=OFF -DCOMPILER_RT_BUILD_ORC=OFF -DCOMPILER_RT_BUILD_PROFILE=OFF -DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_XRAY=OFF -DENABLE_LINKER_BUILD_ID=ON -DLIBCXX_INCLUDE_BENCHMARKS=OFF -DLIBCXXABI_USE_LLVM_UNWINDER=OFF -DLLVM_BINUTILS_INCDIR=%{_includedir} -DLLVM_BUILD_RUNTIME=ON -DLLVM_DEFAULT_TARGET_TRIPLE=%{_target_platform} -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_FFI=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_ZLIB=ON -DLLVM_ENABLE_ZSTD=ON -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} -DLLVM_TOOL_GOLD_BUILD=ON -DLLVM_TOOL_LLVM_AS_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_DIS_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_DLANG_DEMANGLE_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_ISEL_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_ITANIUM_DEMANGLE_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_MC_ASSEMBLE_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_MC_DISASSEMBLE_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_MICROSOFT_DEMANGLE_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_OPT_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_RUST_DEMANGLE_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_SPECIAL_CASE_LIST_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_YAML_NUMERIC_PARSER_FUZZER_BUILD=OFF -DLLVM_TOOL_LLVM_YAML_PARSER_FUZZER_BUILD=OFF -DLLVM_TOOL_VFABI_DEMANGLE_FUZZER_BUILD=OFF -DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_BUILD_TOOLS=ON -DLLVM_BUILD_UTILS=ON -DMLIR_BUILD_MLIR_C_DYLIB=ON -DCMAKE_INSTALL_LIBDIR=lib -DLLVM_ENABLE_PROJECTS=%{llvm_projects} -DLLVM_TOOL_LIBCXXABI_BUILD=ON -DLLVM_TOOL_LIBCXX_BUILD=ON -DLLVM_ENABLE_RUNTIMES=%{llvm_runtimes} ) export CC=/usr/bin/clang export CXX=/usr/bin/clang++ %define _vpath_srcdir llvm %define _vpath_builddir build %cmake "${llvmrocm_cmake_config[@]}" %cmake_build -j ${JOBS} cmake_device_libs_args=( -DROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW="%{amd_device_libs_prefix}/amdgcn" -DROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_OLD="" ) cmake_rocm_tools=( -DLLVM_DIR="$PWD/build/lib/cmake/llvm" %if %{with build_with_rocm_tools} -DCMAKE_AR=$PWD/build/bin/llvm-ar -DCMAKE_C_COMPILER=$PWD/build/bin/clang -DCMAKE_CXX_COMPILER=$PWD/build/bin/clang++ -DCMAKE_LINKER=$PWD/build/bin/ld.lld -DCMAKE_RANLIB=$PWD/build/bin/llvm-ranlib -DLLVM_DIR=$PWD/build/lib/cmake/llvm -DClang_DIR=$PWD/build/lib/cmake/clang -DLLD_DIR=$PWD/build/lib/cmake/lld %endif ) %define _vpath_srcdir amd/device-libs %define _vpath_builddir bdev-libs %cmake -Wno-dev "${llvmrocm_cmake_config[@]}" \ "${cmake_device_libs_args[@]}" \ "${cmake_rocm_tools[@]}" \ -DLLVM_DIR="$PWD/build/lib/cmake/llvm" %cmake_build -j ${JOBS} cmake_comgr_args=( -D BUILD_TESTING=OFF -DAMDDeviceLibs_DIR="$PWD/bdev-libs/lib/cmake/AMDDeviceLibs" ) %define _vpath_srcdir amd/comgr %define _vpath_builddir bcomgr %cmake "${llvmrocm_cmake_config[@]}" \ "${cmake_device_libs_args[@]}" \ "${cmake_rocm_tools[@]}" \ -DLLVM_DIR="$PWD/build/lib/cmake/llvm;$PWD/bdev-libs/lib/cmake/llvm" \ "${cmake_comgr_args[@]}" %cmake_build -j ${JOBS} %define _vpath_srcdir amd/hipcc %define _vpath_builddir bhipcc %cmake "${llvmrocm_cmake_config[@]}" \ "${cmake_rocm_tools[@]}" \ -DLLVM_DIR="$PWD/build/lib/cmake/llvm" \ -DCMAKE_SKIP_INSTALL_RPATH=OFF %cmake_build -j ${JOBS} %install install -Dpm 644 macros.rocmcompiler \ %{buildroot}%{_rpmmacrodir}/macros.rocmcompiler #LLVM %define _vpath_builddir build %cmake_install #device-libs %define _vpath_builddir bdev-libs %cmake_install #comgr %define _vpath_builddir bcomgr %cmake_install #hipcc %define _vpath_builddir bhipcc %cmake_install # Make directories users of rocm-rpm-modules will install to %global modules_gpu_list gfx8 gfx9 gfx10 gfx11 gfx12 gfx906 gfx908 gfx90a gfx942 gfx950 gfx1031 gfx1036 gfx1100 gfx1101 gfx1102 gfx1103 gfx1150 gfx1151 gfx1152 gfx1200 gfx1201 for gpu in %{modules_gpu_list} do mkdir -p %{buildroot}%{bundle_prefix}/$gpu/lib/cmake mkdir -p %{buildroot}%{bundle_prefix}/$gpu/bin mkdir -p %{buildroot}%{bundle_prefix}/$gpu/include done mkdir -p %{buildroot}%{bundle_prefix}/lib/cmake mkdir -p %{buildroot}%{bundle_prefix}/bin mkdir -p %{buildroot}%{bundle_prefix}/include # Remove lld's libs #Don't do this just cause us issues #rm -rf %{buildroot}%{bundle_prefix}/include/lld #rm -rf %{buildroot}%{bundle_prefix}/lib/cmake/lld #rm -rf %{buildroot}%{bundle_prefix}/lib/liblld* %if %{with perl} # Fix perl module files installation: # Eventually upstream plans to deprecate Perl usage, see README.md mkdir -p %{buildroot}/%{perl_vendorlib} mv %{buildroot}/%{bundle_prefix}/bin/hip*.pm %{buildroot}/%{perl_vendorlib}/ %else rm -f %{buildroot}/%{bundle_prefix}/bin/hip*.pm rm -f %{buildroot}/%{bundle_prefix}/bin/hip*.pl rm -rf %{buildroot}/%{bundle_prefix}/hip %endif rm -rf %{buildroot}/%{bundle_prefix}/share/doc %files -n rocm%{rocm_release}-macros %{_rpmmacrodir}/macros.rocmcompiler %files -n rocm%{rocm_release}-device-libs %dir %{bundle_prefix}/lib/cmake/AMDDeviceLibs %license amd/device-libs/LICENSE.TXT %doc amd/device-libs/README.md amd/device-libs/doc/*.md %{bundle_prefix}/lib/cmake/AMDDeviceLibs/*.cmake %{bundle_prefix}/%{amd_device_libs_prefix}/amdgcn/* %if 0%{?rhel} || 0%{?fedora} %exclude %{_docdir}/ROCm-Device-Libs %endif %files -n rocm%{rocm_release}-comgr %license amd/comgr/LICENSE.txt %license amd/comgr/NOTICES.txt %doc amd/comgr/README.md #{bundle_prefix}/libamd_comgr.so.* %{bundle_prefix}/lib/libamd_comgr.a %if 0%{?rhel} || 0%{?fedora} %exclude %{_docdir}/amd_comgr %endif %files -n rocm%{rocm_release}-comgr-devel %dir %{bundle_prefix}/include//amd_comgr %dir %{bundle_prefix}/lib/cmake/amd_comgr %{bundle_prefix}/include/amd_comgr/amd_comgr.h #{bundle_prefix}/libamd_comgr.so %{bundle_prefix}/lib/cmake/amd_comgr/*.cmake %files -n rocm%{rocm_release}-hipcc %license amd/hipcc/LICENSE.txt %doc amd/hipcc/README.md %{bundle_prefix}/bin//hipcc %{bundle_prefix}/bin/hipconfig %if %{with perl} %{bundle_prefix}/bin/hipcc.pl %{bundle_prefix}/bin/hipconfig.pl %{perl_vendorlib}/hip*.pm %endif %if 0%{?rhel} || 0%{?fedora} %exclude %{_docdir}/hipcc %endif %files -n rocm%{rocm_release}-hipcc-libomp-devel # ROCM LLVM %files -n rocm%{rocm_release}-llvm-filesystem %dir %{bundle_prefix} # For rocm-rpm-modules %dir %{bundle_prefix}/bin %dir %{bundle_prefix}/include %dir %{bundle_prefix}/lib %dir %{bundle_prefix}/gfx8 %dir %{bundle_prefix}/gfx8/bin %dir %{bundle_prefix}/gfx8/include %dir %{bundle_prefix}/gfx8/lib %dir %{bundle_prefix}/gfx8/lib/cmake %dir %{bundle_prefix}/gfx9 %dir %{bundle_prefix}/gfx9/bin %dir %{bundle_prefix}/gfx9/include %dir %{bundle_prefix}/gfx9/lib %dir %{bundle_prefix}/gfx9/lib/cmake %dir %{bundle_prefix}/gfx10 %dir %{bundle_prefix}/gfx10/bin %dir %{bundle_prefix}/gfx10/include %dir %{bundle_prefix}/gfx10/lib %dir %{bundle_prefix}/gfx10/lib/cmake %dir %{bundle_prefix}/gfx11 %dir %{bundle_prefix}/gfx11/bin %dir %{bundle_prefix}/gfx11/include %dir %{bundle_prefix}/gfx11/lib %dir %{bundle_prefix}/gfx11/lib/cmake %dir %{bundle_prefix}/gfx12 %dir %{bundle_prefix}/gfx12/bin %dir %{bundle_prefix}/gfx12/include %dir %{bundle_prefix}/gfx12/lib %dir %{bundle_prefix}/gfx12/lib/cmake %dir %{bundle_prefix}/gfx906 %dir %{bundle_prefix}/gfx906/bin %dir %{bundle_prefix}/gfx906/include %dir %{bundle_prefix}/gfx906/lib %dir %{bundle_prefix}/gfx906/lib/cmake %dir %{bundle_prefix}/gfx908 %dir %{bundle_prefix}/gfx908/bin %dir %{bundle_prefix}/gfx908/include %dir %{bundle_prefix}/gfx908/lib %dir %{bundle_prefix}/gfx908/lib/cmake %dir %{bundle_prefix}/gfx90a %dir %{bundle_prefix}/gfx90a/bin %dir %{bundle_prefix}/gfx90a/include %dir %{bundle_prefix}/gfx90a/lib %dir %{bundle_prefix}/gfx90a/lib/cmake %dir %{bundle_prefix}/gfx942 %dir %{bundle_prefix}/gfx942/bin %dir %{bundle_prefix}/gfx942/include %dir %{bundle_prefix}/gfx942/lib %dir %{bundle_prefix}/gfx942/lib/cmake %dir %{bundle_prefix}/gfx950 %dir %{bundle_prefix}/gfx950/bin %dir %{bundle_prefix}/gfx950/include %dir %{bundle_prefix}/gfx950/lib %dir %{bundle_prefix}/gfx950/lib/cmake %dir %{bundle_prefix}/gfx1031 %dir %{bundle_prefix}/gfx1031/bin %dir %{bundle_prefix}/gfx1031/include %dir %{bundle_prefix}/gfx1031/lib %dir %{bundle_prefix}/gfx1031/lib/cmake %dir %{bundle_prefix}/gfx1036 %dir %{bundle_prefix}/gfx1036/bin %dir %{bundle_prefix}/gfx1036/include %dir %{bundle_prefix}/gfx1036/lib %dir %{bundle_prefix}/gfx1036/lib/cmake %dir %{bundle_prefix}/gfx1100 %dir %{bundle_prefix}/gfx1100/bin %dir %{bundle_prefix}/gfx1100/include %dir %{bundle_prefix}/gfx1100/lib %dir %{bundle_prefix}/gfx1100/lib/cmake %dir %{bundle_prefix}/gfx1101 %dir %{bundle_prefix}/gfx1101/bin %dir %{bundle_prefix}/gfx1101/include %dir %{bundle_prefix}/gfx1101/lib %dir %{bundle_prefix}/gfx1101/lib/cmake %dir %{bundle_prefix}/gfx1102 %dir %{bundle_prefix}/gfx1102/bin %dir %{bundle_prefix}/gfx1102/include %dir %{bundle_prefix}/gfx1102/lib %dir %{bundle_prefix}/gfx1102/lib/cmake %dir %{bundle_prefix}/gfx1103 %dir %{bundle_prefix}/gfx1103/bin %dir %{bundle_prefix}/gfx1103/include %dir %{bundle_prefix}/gfx1103/lib %dir %{bundle_prefix}/gfx1103/lib/cmake %dir %{bundle_prefix}/gfx1150 %dir %{bundle_prefix}/gfx1150/bin %dir %{bundle_prefix}/gfx1150/include %dir %{bundle_prefix}/gfx1150/lib %dir %{bundle_prefix}/gfx1150/lib/cmake %dir %{bundle_prefix}/gfx1151 %dir %{bundle_prefix}/gfx1151/bin %dir %{bundle_prefix}/gfx1151/include %dir %{bundle_prefix}/gfx1151/lib %dir %{bundle_prefix}/gfx1151/lib/cmake %dir %{bundle_prefix}/gfx1152 %dir %{bundle_prefix}/gfx1152/bin %dir %{bundle_prefix}/gfx1152/include %dir %{bundle_prefix}/gfx1152/lib %dir %{bundle_prefix}/gfx1152/lib/cmake %dir %{bundle_prefix}/gfx1200 %dir %{bundle_prefix}/gfx1200/bin %dir %{bundle_prefix}/gfx1200/include %dir %{bundle_prefix}/gfx1200/lib %dir %{bundle_prefix}/gfx1200/lib/cmake %dir %{bundle_prefix}/gfx1201 %dir %{bundle_prefix}/gfx1201/bin %dir %{bundle_prefix}/gfx1201/include %dir %{bundle_prefix}/gfx1201/lib %dir %{bundle_prefix}/gfx1201/lib/cmake # For llvm %dir %{bundle_prefix}/include/clang %dir %{bundle_prefix}/include/clang-c %dir %{bundle_prefix}/include/llvm %dir %{bundle_prefix}/include/llvm-c %dir %{bundle_prefix}/lib %dir %{bundle_prefix}/lib/clang %dir %{bundle_prefix}/lib/clang/%{llvm_major} %dir %{bundle_prefix}/lib/clang/%{llvm_major}/include %dir %{bundle_prefix}/lib/clang/%{llvm_major}/include/cuda_wrappers %dir %{bundle_prefix}/lib/clang/%{llvm_major}/include/llvm_libc_wrappers %dir %{bundle_prefix}/lib/clang/%{llvm_major}/include/openmp_wrappers %dir %{bundle_prefix}/lib/clang/%{llvm_major}/include/ppc_wrappers %dir %{bundle_prefix}/lib/clang/%{llvm_major}/lib %dir %{bundle_prefix}/lib/clang/%{llvm_major}/lib/linux %dir %{bundle_prefix}/lib/cmake %dir %{bundle_prefix}/lib/cmake/clang %dir %{bundle_prefix}/lib/cmake/llvm %dir %{bundle_prefix}/share %dir %{bundle_prefix}/share/clang %dir %{bundle_prefix}/share/opt-viewer %files -n rocm%{rocm_release}-llvm-libs %{bundle_prefix}/lib/libLLVM-*.so %{bundle_prefix}/lib/libLLVM.so.* %{bundle_prefix}/lib/libLTO.so.* %{bundle_prefix}/lib/libRemarks.so.* %post -n rocm%{rocm_release}-llvm-libs -p /sbin/ldconfig %postun -n rocm%{rocm_release}-llvm-libs -p /sbin/ldconfig %files -n rocm%{rocm_release}-llvm %license llvm/LICENSE.TXT %{bundle_prefix}/bin/bugpoint %{bundle_prefix}/bin/llc %{bundle_prefix}/bin/lli %{bundle_prefix}/bin/amdgpu-arch %{bundle_prefix}/bin/dsymutil %{bundle_prefix}/bin/llvm* %{bundle_prefix}/bin/opt %{bundle_prefix}/bin/reduce-chunk-list %{bundle_prefix}/bin/sancov %{bundle_prefix}/bin/sanstats %{bundle_prefix}/bin/verify-uselistorder %{bundle_prefix}/share/opt-viewer/* %files -n rocm%{rocm_release}-llvm-devel %license llvm/LICENSE.TXT %{bundle_prefix}/include/llvm/* %{bundle_prefix}/include/llvm-c/* %{bundle_prefix}/lib/cmake/llvm/* %{bundle_prefix}/lib/libLLVM.so %{bundle_prefix}/lib/libLTO.so %{bundle_prefix}/lib/libRemarks.so %{bundle_prefix}/lib/LLVMgold.so %files -n rocm%{rocm_release}-llvm-static %license llvm/LICENSE.TXT %{bundle_prefix}/lib/libLLVM*.a # ROCM CLANG %files -n rocm%{rocm_release}-clang-libs #{bundle_prefix}/lib/libclang*.so.* %{bundle_prefix}/lib/libclang*.* %{bundle_prefix}/lib/libfindAllSymbols.* %files -n rocm%{rocm_release}-clang-runtime-devel %{bundle_prefix}/lib/clang/%{llvm_major}/include/* %{bundle_prefix}/lib/clang/%{llvm_major}/lib/linux/clang_rt.* %{bundle_prefix}/lib/clang/%{llvm_major}/lib/linux/libclang_rt.* %files -n rocm%{rocm_release}-clang %license clang/LICENSE.TXT %{bundle_prefix}/bin/c-index-test %{bundle_prefix}/bin/clang* %{bundle_prefix}/bin/diagtool %{bundle_prefix}/bin/find-all-symbols %{bundle_prefix}/bin/flang %{bundle_prefix}/bin/git-clang-format %{bundle_prefix}/bin/hmaptool %{bundle_prefix}/bin/modularize %{bundle_prefix}/bin/nvptx-arch %{bundle_prefix}/bin/pp-trace %{bundle_prefix}/share/clang/* %{bundle_prefix}/share/clang-doc %files -n rocm%{rocm_release}-clang-devel %license clang/LICENSE.TXT %{bundle_prefix}/include/clang/* %{bundle_prefix}/include/clang-c/* %{bundle_prefix}/lib/cmake/clang/* %{bundle_prefix}/lib/libclang*.so # ROCM CLANG TOOLS EXTRA %files -n rocm%{rocm_release}-clang-tools-extra %license clang-tools-extra/LICENSE.TXT %{bundle_prefix}/bin/run-clang-tidy %files -n rocm%{rocm_release}-clang-tools-extra-devel %dir %{bundle_prefix}/include/clang-tidy %license clang-tools-extra/LICENSE.TXT %{bundle_prefix}/include/clang-tidy/* # ROCM LLD %files -n rocm%{rocm_release}-lld %license lld/LICENSE.TXT %{bundle_prefix}/bin/ld.lld %{bundle_prefix}/bin/ld64.lld %{bundle_prefix}/bin/lld %{bundle_prefix}/bin/lld-link %{bundle_prefix}/bin/wasm-ld %{bundle_prefix}/lib/cmake/lld %{bundle_prefix}/lib/liblld* %{bundle_prefix}/include/lld/* # ROCM LIBC++ %files -n rocm%{rocm_release}-libc++ %license libcxx/LICENSE.TXT %{bundle_prefix}/lib/libc++.so.* %exclude %{bundle_prefix}/lib/libc++.so %{bundle_prefix}/lib/libc++abi.so.* %{bundle_prefix}/lib/libc++.modules.json %post -n rocm%{rocm_release}-libc++ -p /sbin/ldconfig %postun -n rocm%{rocm_release}-libc++ -p /sbin/ldconfig %files -n rocm%{rocm_release}-libc++-devel %dir %{bundle_prefix}/share/libc++ %{bundle_prefix}/include/c++/ %{bundle_prefix}/share/libc++/ %{bundle_prefix}/lib/libc++.so %{bundle_prefix}/lib/libc++abi.so %files -n rocm%{rocm_release}-libc++-static %{bundle_prefix}/lib/libc++.a %{bundle_prefix}/lib/libc++abi.a %{bundle_prefix}/lib/libc++experimental.a