[
https://issues.apache.org/jira/browse/ARROW-16876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17557342#comment-17557342
]
Jefferson Carpenter edited comment on ARROW-16876 at 6/22/22 3:42 PM:
----------------------------------------------------------------------
1) I'm compiling without rtti to save on binary size. (Linux build is 15.2MB
with RTTI / 15MB without on GCC 7.3.1, Mac build 11.1MB / 10.7MB on Apple clang
version 13.0.0, so not a big difference).
2) dynamic_cast gives a compile error.
was (Author: jcarpenter2):
1) I'm compiling without rtti to save on binary size (although I might not need
to with this program). (I'll edit this comment with the binary sizes with and
without when I get those numbers.)
2) dynamic_cast gives a compile error.
> [C++] NDEBUG required for -fno-rtti
> -----------------------------------
>
> Key: ARROW-16876
> URL: https://issues.apache.org/jira/browse/ARROW-16876
> Project: Apache Arrow
> Issue Type: Wish
> Components: C++
> Affects Versions: 8.0.0
> Reporter: Jefferson Carpenter
> Priority: Minor
>
> Some of the code in checked_cast.h uses {{dynamic_cast}} unless NDEBUG is
> defined. Defining NDEBUG affects other C++ functionality, for example it
> causes {{assert}} statements to be compiled out of the program.
> It would be nice if Arrow provided some mechanism for compiling without RTTI
> (viz. not using dynamic_cast) without requiring NDEBUG to be defined and
> affecting assertions in other code.
>
> Workaround 1: Compile without neither -fno-rtti nor NDEBUG in DEBUG mode, and
> with both -fno-rtti and NDEBUG in RELEASE mode.
> Workaround 2: Include Arrow headers through a project header that defines
> NDEBUG, has the Arrow include statements, and then undefines NDEBUG.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)