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 2017/06/24 15:05:13 UTC
arrow git commit: ARROW-1135: [C++] Use clang 4.0 in one of the Linux
builds
Repository: arrow
Updated Branches:
refs/heads/master 73007de72 -> 41524d6d2
ARROW-1135: [C++] Use clang 4.0 in one of the Linux builds
This will help us keep the Linux build clean on latest clang
Author: Wes McKinney <we...@twosigma.com>
Closes #779 from wesm/ARROW-1135 and squashes the following commits:
ca8ba32b [Wes McKinney] Fix dependency graph problems. Disable sign-conversion warnings
e5d3efb1 [Wes McKinney] Upgrade Flatbuffers to 1.7.1, because build fails in 1.6.0 on clang 4.0
f186b926 [Wes McKinney] Add clang installer script
24bb6c63 [Wes McKinney] Use clang 4.0 in one of the Linux builds
Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/41524d6d
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/41524d6d
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/41524d6d
Branch: refs/heads/master
Commit: 41524d6d280b284ca5be31de426928fd6eea97c7
Parents: 73007de
Author: Wes McKinney <we...@twosigma.com>
Authored: Sat Jun 24 11:05:08 2017 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Sat Jun 24 11:05:08 2017 -0400
----------------------------------------------------------------------
.travis.yml | 10 +++-------
ci/travis_before_script_cpp.sh | 2 +-
ci/travis_env_common.sh | 2 ++
ci/travis_install_clang_tools.sh | 19 +++++++++++++++++++
cpp/CMakeLists.txt | 9 +++++----
cpp/cmake_modules/ThirdpartyToolchain.cmake | 13 ++++++-------
6 files changed, 36 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/arrow/blob/41524d6d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 315cbd2..ff2cafe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,8 +85,9 @@ matrix:
env: ARROW_TEST_GROUP=integration
jdk: openjdk7
before_script:
- - export CC="gcc-4.9"
- - export CXX="g++-4.9"
+ - source $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh
+ - export CC="clang-4.0"
+ - export CXX="clang++-4.0"
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh
@@ -122,11 +123,6 @@ matrix:
before_install:
- ulimit -c unlimited -S
-- export CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
-- export ARROW_CPP_INSTALL=$TRAVIS_BUILD_DIR/cpp-install
-
-after_script:
-- rm -rf $CPP_BUILD_DIR
after_failure:
- COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1)
http://git-wip-us.apache.org/repos/asf/arrow/blob/41524d6d/ci/travis_before_script_cpp.sh
----------------------------------------------------------------------
diff --git a/ci/travis_before_script_cpp.sh b/ci/travis_before_script_cpp.sh
index 3a1836c..36966da 100755
--- a/ci/travis_before_script_cpp.sh
+++ b/ci/travis_before_script_cpp.sh
@@ -64,7 +64,7 @@ fi
if [ $TRAVIS_OS_NAME == "linux" ]; then
cmake $CMAKE_COMMON_FLAGS \
$CMAKE_LINUX_FLAGS \
- -DARROW_CXXFLAGS="-Wconversion -Werror" \
+ -DARROW_CXXFLAGS="-Wconversion -Wno-sign-conversion -Werror" \
$ARROW_CPP_DIR
else
cmake $CMAKE_COMMON_FLAGS \
http://git-wip-us.apache.org/repos/asf/arrow/blob/41524d6d/ci/travis_env_common.sh
----------------------------------------------------------------------
diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh
index 9ded3e0..a2e5910 100755
--- a/ci/travis_env_common.sh
+++ b/ci/travis_env_common.sh
@@ -23,6 +23,8 @@ export ARROW_JAVA_DIR=${TRAVIS_BUILD_DIR}/java
export ARROW_JS_DIR=${TRAVIS_BUILD_DIR}/js
export ARROW_INTEGRATION_DIR=$TRAVIS_BUILD_DIR/integration
+export CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
+
export ARROW_CPP_INSTALL=$TRAVIS_BUILD_DIR/cpp-install
export ARROW_CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
export ARROW_C_GLIB_INSTALL=$TRAVIS_BUILD_DIR/c-glib-install
http://git-wip-us.apache.org/repos/asf/arrow/blob/41524d6d/ci/travis_install_clang_tools.sh
----------------------------------------------------------------------
diff --git a/ci/travis_install_clang_tools.sh b/ci/travis_install_clang_tools.sh
new file mode 100644
index 0000000..a4fd0e2
--- /dev/null
+++ b/ci/travis_install_clang_tools.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License. See accompanying LICENSE file.
+
+wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
+sudo apt-add-repository -y \
+ "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-4.0 main"
+sudo apt-get update
+sudo apt-get install clang-4.0 clang-format-4.0 clang-tidy-4.0
http://git-wip-us.apache.org/repos/asf/arrow/blob/41524d6d/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 49e1d97..ca34101 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -182,6 +182,8 @@ endif()
# Dependencies
############################################################
+add_custom_target(arrow_dependencies)
+
include(ThirdpartyToolchain)
# Add common flags
@@ -526,8 +528,7 @@ set(ARROW_STATIC_LINK_LIBS
snappy
zlib)
-set(ARROW_DEPENDENCIES
- ${ARROW_STATIC_LINK_LIBS})
+add_dependencies(arrow_dependencies ${ARROW_STATIC_LINK_LIBS})
set(ARROW_MIN_TEST_LIBS
arrow_static
@@ -626,7 +627,7 @@ add_subdirectory(src/arrow/io)
if (ARROW_IPC)
add_subdirectory(src/arrow/ipc)
- set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} metadata_fbs)
+ add_dependencies(arrow_dependencies metadata_fbs)
endif()
set(ARROW_SRCS
@@ -684,7 +685,7 @@ set(ARROW_ALL_SRCS
ADD_ARROW_LIB(arrow
SOURCES ${ARROW_ALL_SRCS}
- DEPENDENCIES ${ARROW_DEPENDENCIES}
+ DEPENDENCIES arrow_dependencies
SHARED_LINK_FLAGS ${ARROW_SHARED_LINK_FLAGS}
SHARED_LINK_LIBS ${ARROW_LINK_LIBS}
SHARED_PRIVATE_LINK_LIBS ${ARROW_SHARED_PRIVATE_LINK_LIBS}
http://git-wip-us.apache.org/repos/asf/arrow/blob/41524d6d/cpp/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index f6a9bb4..f51f6ff 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -23,7 +23,7 @@ set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty")
set(GFLAGS_VERSION "2.1.2")
set(GTEST_VERSION "1.8.0")
set(GBENCHMARK_VERSION "1.1.0")
-set(FLATBUFFERS_VERSION "1.6.0")
+set(FLATBUFFERS_VERSION "1.7.1")
set(JEMALLOC_VERSION "4.4.0")
set(SNAPPY_VERSION "1.1.3")
set(BROTLI_VERSION "v0.6.0")
@@ -326,7 +326,6 @@ if(ARROW_BUILD_BENCHMARKS)
endif()
endif()
-
if (ARROW_IPC)
# RapidJSON, header only dependency
if("${RAPIDJSON_HOME}" STREQUAL "")
@@ -349,6 +348,10 @@ if (ARROW_IPC)
message(STATUS "RapidJSON include dir: ${RAPIDJSON_INCLUDE_DIR}")
include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR})
+ if(RAPIDJSON_VENDORED)
+ add_dependencies(arrow_dependencies rapidjson_ep)
+ endif()
+
## Flatbuffers
if("${FLATBUFFERS_HOME}" STREQUAL "")
set(FLATBUFFERS_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/flatbuffers_ep-prefix/src/flatbuffers_ep-install")
@@ -367,12 +370,8 @@ if (ARROW_IPC)
set(FLATBUFFERS_VENDORED 0)
endif()
- if(RAPIDJSON_VENDORED)
- set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} rapidjson_ep)
- endif()
-
if(FLATBUFFERS_VENDORED)
- set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} flatbuffers_ep)
+ add_dependencies(arrow_dependencies flatbuffers_ep)
endif()
message(STATUS "Flatbuffers include dir: ${FLATBUFFERS_INCLUDE_DIR}")