mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
ARROW-3972: misc fixes for LLVM7
This commit is contained in:
1 parent
c858441c36
commit
69fd486678
7 files changed
+31
-23
No files matched your search
@@ -23,7 +23,7 @@ export MINICONDA=$HOME/miniconda
|
||||
export CONDA_PKGS_DIRS=$HOME/.conda_packages
|
||||
export CONDA_BINUTILS_VERSION=2.31
|
||||
|
||||
export ARROW_LLVM_VERSION=7
|
||||
export ARROW_LLVM_VERSION=7.0
|
||||
export CONDA_LLVM_VERSION="7.0.*"
|
||||
|
||||
export ARROW_CPP_DIR=$TRAVIS_BUILD_DIR/cpp
|
||||
|
||||
@@ -22,8 +22,11 @@ set -ex
|
||||
|
||||
source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
|
||||
|
||||
# extract the major version
|
||||
ARROW_LLVM_MAJOR_VERSION=$(echo $ARROW_LLVM_VERSION | cut -d. -f1)
|
||||
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
||||
sudo apt-add-repository -y \
|
||||
"deb https://llvm.org/apt/$DISTRO_CODENAME/ llvm-toolchain-$DISTRO_CODENAME-$ARROW_LLVM_VERSION main"
|
||||
"deb https://apt.llvm.org/$DISTRO_CODENAME/ llvm-toolchain-$DISTRO_CODENAME-$ARROW_LLVM_MAJOR_VERSION main"
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -q clang-$ARROW_LLVM_VERSION clang-format-$ARROW_LLVM_VERSION clang-tidy-$ARROW_LLVM_VERSION
|
||||
sudo apt-get install -q clang-$ARROW_LLVM_MAJOR_VERSION clang-format-$ARROW_LLVM_MAJOR_VERSION clang-tidy-$ARROW_LLVM_MAJOR_VERSION
|
||||
@@ -37,16 +37,13 @@ if [ "$ARROW_TRAVIS_COVERAGE" == "1" ]; then
|
||||
sudo apt-get install -y -qq lcov
|
||||
fi
|
||||
|
||||
set -x
|
||||
if [ "$ARROW_TRAVIS_GANDIVA" == "1" ]; then
|
||||
sudo apt-get install -y -qq llvm-$ARROW_LLVM_VERSION-dev
|
||||
fi
|
||||
|
||||
set -x
|
||||
if [ "$DISTRO_CODENAME" != "trusty" ]; then
|
||||
if [ "$ARROW_TRAVIS_GANDIVA" == "1" ]; then
|
||||
sudo apt-get install -y -qq llvm-$ARROW_LLVM_VERSION-dev
|
||||
fi
|
||||
|
||||
sudo apt-get install -y -qq maven
|
||||
|
||||
# Remove Travis-specific versions of Java
|
||||
|
||||
+1
-1
@@ -300,7 +300,7 @@ sudo apt-get install llvm-7.0-dev
|
||||
On macOS, you can use [Homebrew][1]:
|
||||
|
||||
```shell
|
||||
brew install llvm@6
|
||||
brew install llvm@7
|
||||
```
|
||||
|
||||
The optional `gandiva` libraries and tests can be built by passing
|
||||
|
||||
@@ -25,7 +25,7 @@ if (APPLE)
|
||||
find_program(BREW_BIN brew)
|
||||
if (BREW_BIN)
|
||||
execute_process(
|
||||
COMMAND ${BREW_BIN} --prefix "llvm@6"
|
||||
COMMAND ${BREW_BIN} --prefix "llvm@7"
|
||||
OUTPUT_VARIABLE LLVM_BREW_PREFIX
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
@@ -43,16 +43,6 @@ message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
||||
# Find the libraries that correspond to the LLVM components
|
||||
llvm_map_components_to_libnames(LLVM_LIBS core mcjit native ipo bitreader target linker analysis debuginfodwarf)
|
||||
|
||||
find_program(CLANG_EXECUTABLE
|
||||
NAMES clang-${ARROW_LLVM_VERSION}
|
||||
clang-${ARROW_LLVM_MAJOR_VERSION}
|
||||
HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
if (CLANG_EXECUTABLE)
|
||||
message(STATUS "Found clang ${CLANG_EXECUTABLE}")
|
||||
else ()
|
||||
message(FATAL_ERROR "Couldn't find clang")
|
||||
endif ()
|
||||
|
||||
find_program(LLVM_LINK_EXECUTABLE llvm-link
|
||||
HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
if (LLVM_LINK_EXECUTABLE)
|
||||
@@ -61,6 +51,24 @@ else ()
|
||||
message(FATAL_ERROR "Couldn't find llvm-link")
|
||||
endif ()
|
||||
|
||||
find_program(CLANG_EXECUTABLE
|
||||
NAMES clang-${ARROW_LLVM_VERSION}
|
||||
clang-${ARROW_LLVM_MAJOR_VERSION}
|
||||
HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
if (CLANG_EXECUTABLE)
|
||||
message(STATUS "Found clang ${ARROW_LLVM_VERSION} ${CLANG_EXECUTABLE}")
|
||||
else ()
|
||||
# If clang-7 not available, switch to normal clang.
|
||||
find_program(CLANG_EXECUTABLE
|
||||
NAMES clang
|
||||
HINTS ${LLVM_TOOLS_BINARY_DIR})
|
||||
if (CLANG_EXECUTABLE)
|
||||
message(STATUS "Found clang ${CLANG_EXECUTABLE}")
|
||||
else ()
|
||||
message(FATAL_ERROR "Couldn't find clang")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
add_library(LLVM::LLVM_INTERFACE INTERFACE IMPORTED)
|
||||
|
||||
set_target_properties(LLVM::LLVM_INTERFACE PROPERTIES
|
||||
|
||||
@@ -50,8 +50,8 @@ before_script:
|
||||
|
||||
script:
|
||||
- mkdir -p dist
|
||||
- arrow/dev/tasks/gandiva-jars/build-cpp.sh
|
||||
- arrow/dev/tasks/gandiva-jars/build-java.sh
|
||||
- arrow/dev/tasks/gandiva-jars/build-cpp.sh || travis_terminate 1
|
||||
- arrow/dev/tasks/gandiva-jars/build-java.sh || travis_terminate 1
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
|
||||
@@ -40,8 +40,8 @@ before_script:
|
||||
|
||||
script:
|
||||
- mkdir -p dist
|
||||
- arrow/dev/tasks/gandiva-jars/build-cpp.sh
|
||||
- arrow/dev/tasks/gandiva-jars/build-java.sh
|
||||
- arrow/dev/tasks/gandiva-jars/build-cpp.sh || travis_terminate 1
|
||||
- arrow/dev/tasks/gandiva-jars/build-java.sh || travis_terminate 1
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
|
||||
Reference in new issue
Block a user