[
https://issues.apache.org/jira/browse/ARROW-18231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627976#comment-17627976
]
Antoine Pitrou commented on ARROW-18231:
----------------------------------------
cc [~kou]
> [C++] Cannot override optimization level using CXXFLAGS
> -------------------------------------------------------
>
> Key: ARROW-18231
> URL: https://issues.apache.org/jira/browse/ARROW-18231
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Antoine Pitrou
> Priority: Major
>
> In release mode, Arrow C++ unconditionally adds {{-O2}} _at the end_ of the
> compiler flags.
> So, if you do something like:
> {code:bash}
> export CXXFLAGS=-O0
> cmake ...
> {code}
> the final compilation flags will look like {{-O0 -O2}}, meaning the
> user-provided optimization level is ignored.
> One can instead use the {{ARROW_CXXFLAGS}} CMake variable, but it only
> overrides the flags for Arrow itself, not the bundled dependencies.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)