You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/08/16 00:09:39 UTC

[arrow] branch master updated: ARROW-6259: [C++] Add -Wno-extra-semi-stmt when compiling with clang 8 to work around Flatbuffers bug, suppress other new LLVM 8 warnings

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new fb8cb89  ARROW-6259: [C++] Add -Wno-extra-semi-stmt when compiling with clang 8 to work around Flatbuffers bug, suppress other new LLVM 8 warnings
fb8cb89 is described below

commit fb8cb8968fa28c3b3e943cb86dbe5c57d97ea422
Author: Wes McKinney <we...@apache.org>
AuthorDate: Thu Aug 15 19:09:24 2019 -0500

    ARROW-6259: [C++] Add -Wno-extra-semi-stmt when compiling with clang 8 to work around Flatbuffers bug, suppress other new LLVM 8 warnings
    
    LLVM 8 introduces `-Wextra-semi-stmt` and Flatbuffers generates code with superfluous semicolons (upstream bug report https://github.com/google/flatbuffers/issues/5482). This is breaking our macOS builds for the last few hours because conda-forge upgraded their compiler toolchain from Apple clang 4.0.1 to clang 8.0.0 this afternoon.
    
    Closes #5096 from wesm/ARROW-6259 and squashes the following commits:
    
    96cbba9e8 <Wes McKinney> Suppress -Wshadow-field and -Wc++2a-compat also
    686339caf <Wes McKinney> Add -Wno-extra-semi-stmt when compiling with clang 8 to work around Flatbuffers bug
    
    Authored-by: Wes McKinney <we...@apache.org>
    Signed-off-by: Wes McKinney <we...@apache.org>
---
 cpp/cmake_modules/SetupCxxFlags.cmake | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake
index 9eba9e8..09d5bf2 100644
--- a/cpp/cmake_modules/SetupCxxFlags.cmake
+++ b/cpp/cmake_modules/SetupCxxFlags.cmake
@@ -168,6 +168,15 @@ if("${BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN")
     if("${COMPILER_VERSION}" VERSION_GREATER "3.9")
       set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-zero-as-null-pointer-constant")
     endif()
+
+    if("${COMPILER_VERSION}" VERSION_GREATER "7.0")
+      # ARROW-6259: Flatbuffers generates code with superfluous semicolons, so
+      # we suppress this warning for now. See upstream bug report
+      # https://github.com/google/flatbuffers/issues/5482
+      set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-extra-semi-stmt \
+-Wno-shadow-field -Wno-c++2a-compat")
+    endif()
+
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-unknown-warning-option")
   elseif("${COMPILER_FAMILY}" STREQUAL "gcc")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall \