[ https://issues.apache.org/jira/browse/ARROW-9698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17175977#comment-17175977 ]
Kouhei Sutou commented on ARROW-9698: ------------------------------------- We can't just remove the {{-DNDEBUG}} flag from {{arrow.pc}}. Because there are some {{NDEBUG}} uses in public headers. We can remove the {{-DNDEBUG}} flag from {{arrow.pc}} after we remove these {{NDEBUG}} uses in public headers or replace {{NDEBUG}} with {{ARROW_DEBUG_BUILD}} or something. > [C++] Revert "Add -NDEBUG flag to arrow.pc" > ------------------------------------------- > > Key: ARROW-9698 > URL: https://issues.apache.org/jira/browse/ARROW-9698 > Project: Apache Arrow > Issue Type: Bug > Components: C++ > Reporter: Brian Dunlay > Priority: Trivial > > ARROW-2275 introduced a `#ifndef NDEBUG` check around a function which caused > the function to to be omitted during release builds. > As a workaround, ARROW-2313 added -DNDEBUG flags to the [pkg-config cmake > definition|https://github.com/apache/arrow/pull/1752] so that anyone using > the release build of the package would not run into any issues with the > missing code. As a result of this change,`pkg-config arrow --cflags` results > in -DNDEBUG being added as a compiler flag, forcing itself on the downstream > project whenever the dependency is located using pkg-config --. > The original `#ifndef NDEBUG` change was > [reverted|https://github.com/apache/arrow/pull/1756] with ARROW-2316, but the > workaround in ARROW-2313 remains. > I am proposing to revert the workaround in ARROW-2313 so that downstream > projects may link against the release build of arrow without adopting the > -DNDEBUG flag unnecessarily. -- This message was sent by Atlassian Jira (v8.3.4#803005)