commit:     526eb8d42a4ff112e1e3b0f8aee4ae57778f66d6
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Wed Feb  8 02:38:50 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb  8 04:17:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=526eb8d4

dev-libs/rocr-runtime: NDEBUG by default; add debug use flag

The rocr-runtime relies on -DNDEBUG cxxflag to build without debug code.
Previously debug codes are turned on and issues are observed by users.

Reference: 
https://github.com/RadeonOpenCompute/ROCm/issues/1880#issuecomment-1416759759
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29297
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{rocr-runtime-5.3.3.ebuild => rocr-runtime-5.3.3-r1.ebuild}     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-libs/rocr-runtime/rocr-runtime-5.3.3.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-5.3.3-r1.ebuild
similarity index 94%
rename from dev-libs/rocr-runtime/rocr-runtime-5.3.3.ebuild
rename to dev-libs/rocr-runtime/rocr-runtime-5.3.3-r1.ebuild
index 99184725f576..f408d4213314 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-5.3.3.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-5.3.3-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake llvm
+inherit cmake flag-o-matic llvm
 
 LLVM_MAX_SLOT=15
 
@@ -25,6 +25,7 @@ PATCHES=(
 
 LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
+IUSE="debug"
 
 COMMON_DEPEND="dev-libs/elfutils"
 RDEPEND="${COMMON_DEPEND}"
@@ -36,8 +37,6 @@ DEPEND="${COMMON_DEPEND}
 BDEPEND="app-editors/vim-core"
        # vim-core is needed for "xxd"
 
-CMAKE_BUILD_TYPE=Release
-
 src_prepare() {
        # ... otherwise system llvm/clang is used ...
        sed -e "/find_package(Clang REQUIRED HINTS 
/s:\${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS 
/opt/rocm/llvm:$(get_llvm_prefix ${LLVM_MAX_SLOT}):" -i 
image/blit_src/CMakeLists.txt || die
@@ -49,6 +48,7 @@ src_prepare() {
 }
 
 src_configure() {
+       use debug || append-cxxflags "-DNDEBUG"
        local mycmakeargs=( -DINCLUDE_PATH_COMPATIBILITY=OFF )
        cmake_src_configure
 }

Reply via email to