#!/usr/bin/make -f export CXX=clang++-17 export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto export DEB_CXXFLAGS_MAINT_PREPEND = -gz export VERBOSE=1 # filter incompatible options from affecting device code CXXFLAGS := $(subst -fstack-protector-strong,-Xarch_host -fstack-protector-strong,$(CXXFLAGS)) CXXFLAGS := $(subst -fcf-protection,-Xarch_host -fcf-protection,$(CXXFLAGS)) NUM_THREADS = 1 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUM_THREADS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif CMAKE_FLAGS = \ -DCMAKE_BUILD_TYPE=Release \ -DROCM_SYMLINK_LIBS=OFF \ -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \ -DMIOPEN_USE_MLIR=OFF \ -DMIOPEN_BUILD_DRIVER=ON \ -DMIOPEN_ENABLE_FIN=OFF \ -DMIOPEN_STRIP_SYMBOLS=OFF \ -DMIOPEN_DISABLE_SYSDB=ON \ -DBoost_USE_STATIC_LIBS=OFF # Those 2 next are going together both ON or both OFF # This result in disabling both until HIPRTC is configurable TODO: CMAKE_FLAGS += \ -DMIOPEN_USE_HIPRTC=OFF \ -DMIOPEN_USE_COMGR=OFF # From TheRock build/logs/MIOpen_configure.log CMAKE_FLAGS += \ -DHIP_PLATFORM=$(shell hipconfig --platform) \ -DBUILD_TESTING=ON \ -DMIOPEN_USE_COMPOSABLEKERNEL=OFF \ -DMIOPEN_USE_MLIR=OFF \ -DMIOPEN_TEST_DISCRETE=OFF # Hack for half ... see override_dh_auto_configure CMAKE_FLAGS += \ -DHALF_INCLUDE_DIR=$(CURDIR)/debian # New requirement For 6.4.4 CMAKE_FLAGS += \ -DMIOPEN_USE_HIPBLASLT=OFF \ -DHIP_OC_COMPILER=clang-17 # -DMIOPEN_DEBUG_GCN_ASM_KERNELS=OFF %: dh $@ -Scmake --builddirectory=build override_dh_auto_configure: [ -d $(CURDIR)/debian/half ] || mkdir debian/half [ -L $(CURDIR)/debian/half/half.hpp ] || ln -s /usr/include/half.hpp $(CURDIR)/debian/half/half.hpp dh_auto_configure -- $(CMAKE_FLAGS) execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9 execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9 execute_after_dh_auto_build-indep: ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) rocm-docs-build rm -rf build/html/_static/fonts rm -rf build/html/_static/vendor rm -f build/html/doxygen/html/jquery.js endif override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) set -e \ ; if [ -r /dev/kfd ] \ ; then echo "W: No tests." \ ; else echo "W: /dev/kfd unreadable: no available AMD GPU." \ ; echo "W: tests skipped." \ ; fi endif # dwz doesn't fully support DWARF-5 yet, see #1016936 override_dh_dwz: :