mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-18 15:09:04 -07:00
sys-libs/llvm-libunwind: avoid spurious assertions with USE=-debug
Respect upstream build type assumptions where they do: * -DLIBUNWIND_ENABLE_ASSERTIONS=ON => -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG * -DLIBUNWIND_ENABLE_ASSERTIONS=OFF => -UNDEBUG See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826. Bug: https://github.com/libunwind/libunwind/issues/138 Bug: https://github.com/llvm/llvm-project/issues/86 Bug: https://github.com/llvm/llvm-project/issues/55584 Closes: https://bugs.gentoo.org/910436 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -67,6 +67,15 @@ multilib_src_configure() {
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# Respect upstream build type assumptions (bug #910436) where they do:
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
|
||||
# -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
|
||||
# -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
|
||||
# -UNDEBUG
|
||||
# See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
|
||||
use debug || append-cppflags -DNDEBUG
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
@@ -67,6 +67,15 @@ multilib_src_configure() {
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# Respect upstream build type assumptions (bug #910436) where they do:
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
|
||||
# -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
|
||||
# -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
|
||||
# -UNDEBUG
|
||||
# See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
|
||||
use debug || append-cppflags -DNDEBUG
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
|
||||
@@ -67,6 +67,15 @@ multilib_src_configure() {
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# Respect upstream build type assumptions (bug #910436) where they do:
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
|
||||
# -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
|
||||
# -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
|
||||
# -UNDEBUG
|
||||
# See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
|
||||
use debug || append-cppflags -DNDEBUG
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
@@ -67,6 +67,15 @@ multilib_src_configure() {
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# Respect upstream build type assumptions (bug #910436) where they do:
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
|
||||
# -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
|
||||
# -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
|
||||
# -UNDEBUG
|
||||
# See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
|
||||
use debug || append-cppflags -DNDEBUG
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
|
||||
@@ -67,6 +67,15 @@ multilib_src_configure() {
|
||||
local use_compiler_rt=OFF
|
||||
[[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
|
||||
|
||||
# Respect upstream build type assumptions (bug #910436) where they do:
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=ON =>
|
||||
# -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG
|
||||
# -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG
|
||||
# -DLIBUNWIND_ENABLE_ASSERTIONS=OFF =>
|
||||
# -UNDEBUG
|
||||
# See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826.
|
||||
use debug || append-cppflags -DNDEBUG
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
|
||||
-DPython3_EXECUTABLE="${PYTHON}"
|
||||
Reference in New Issue
Block a user