kou commented on code in PR #45858:
URL: https://github.com/apache/arrow/pull/45858#discussion_r2002478098


##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
     fi
   }
 
+  ORIGINAL_CXX=${CXX}

Review Comment:
   ```suggestion
     ORIGINAL_CXX="${CXX}"
   ```



##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
     fi
   }
 
+  ORIGINAL_CXX=${CXX}
+  if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+      export CXX="ccache ${CXX}"

Review Comment:
   ```suggestion
       export CXX="ccache ${CXX}"
   ```



##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
     fi
   }
 
+  ORIGINAL_CXX=${CXX}
+  if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+      export CXX="ccache ${CXX}"
+  else
+      export CXX="sccache ${CXX}"

Review Comment:
   I think that we don't need `export` here.



##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
     fi
   }
 
+  ORIGINAL_CXX=${CXX}
+  if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+      export CXX="ccache ${CXX}"
+  else
+      export CXX="sccache ${CXX}"
+  fi
   meson setup \
     --prefix=${MESON_PREFIX:-${ARROW_HOME}} \
     --buildtype=${ARROW_BUILD_TYPE:-debug} \
     -Dtests=$(meson_boolean ${ARROW_BUILD_TESTS:-OFF}) \
     . \
     ${source_dir}
+
+  export CXX=${ORIGINAL_CXX}

Review Comment:
   I think that we don't need `export` here:
   
   ```suggestion
     CXX="${ORIGINAL_CXX}"
   ```
   
   If `CXX` is already exported, we don't need to `export` here. If `CXX` isn't 
exported, we don't need to export an empty `CXX`.



##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
     fi
   }
 
+  ORIGINAL_CXX=${CXX}
+  if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+      export CXX="ccache ${CXX}"
+  else
+      export CXX="sccache ${CXX}"

Review Comment:
   ```suggestion
       if command -v sccache &> /dev/null; then
         export CXX="sccache ${CXX}"
       fi
   ```



##########
ci/scripts/cpp_build.sh:
##########
@@ -118,12 +118,20 @@ if [ "${ARROW_USE_MESON:-OFF}" = "ON" ]; then
     fi
   }
 
+  ORIGINAL_CXX=${CXX}
+  if [ "${ARROW_USE_CCACHE}" = "ON" ]; then
+      export CXX="ccache ${CXX}"
+  else
+      export CXX="sccache ${CXX}"
+  fi

Review Comment:
   Could you surround this with `if [ -n "${CXX}" ]; then ... fi`? `CXX` may 
not be defined.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to