[ 
https://issues.apache.org/jira/browse/ARROW-17580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17598685#comment-17598685
 ] 

Kouhei Sutou commented on ARROW-17580:
--------------------------------------

{quote}
For Arrow C++, it seems {{ARROW_CXXFLAGS}} should be passed to CMake, while the 
{{CXXFLAGS}} environment variable is ignored (it probably shouldn't?).
{quote}

Really? {{CXXFLAGS}} environment variable should be respected because we don't 
override {{CMAKE_CXX_FLAGS}} that is initialized with {{CXXFLAGS}} environment 
variable.
See also:
* https://github.com/apache/arrow/blob/master/cpp/CMakeLists.txt#L555
* https://cmake.org/cmake/help/latest/envvar/CXXFLAGS.html

For PyArrow:
* We should unify {{python/CMakeLists.txt}} and 
{{python/pyarrow/src/CMakeLists.txt}}.
* We need to look into why {{CXXFLAGS}} environment variable is ignored.

> [Doc][C++][Python] Unclear how to influence compilation flags
> -------------------------------------------------------------
>
>                 Key: ARROW-17580
>                 URL: https://issues.apache.org/jira/browse/ARROW-17580
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Documentation, Python
>            Reporter: Antoine Pitrou
>            Priority: Critical
>
> Frequently people need to customize compilation flags for C++ and/or C files.
> Unfortunately, both for Arrow C++ and PyArrow, it is very difficult to find 
> out the proper way to do this.
> For Arrow C++, it seems {{ARROW_CXXFLAGS}} should be passed to CMake, while 
> the {{CXXFLAGS}} environment variable is ignored (it probably shouldn't?).
> For PyArrow, I have not found a way to do it. The {{CXXFLAGS}} environment 
> variable is ignored, and the {{PYARROW_CXXFLAGS}} CMake variable has two 
> problems:
> * it is only recognized for Cython-generated files, not for PyArrow C++ 
> sources
> * it only affects linker calls, while it should actually affect compiler calls



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to