Skip to content

Commit

Permalink
Travis: stop testing with LLVM4, start testing with LLVM6
Browse files Browse the repository at this point in the history
Also:
- make permanent a change that was "LLVM4 or newer"
- add "no longer tested" warning when LLVM4 is detected
  • Loading branch information
steven-johnson committed Mar 8, 2018
1 parent 89a3b84 commit 4e682ea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ env:
#
# Test a mix of llvm versions, a mix of build systems, and a mix of shared vs static library
# Don't build as a static library with cmake. It risks exceeding the travis memory limit.
- LLVM_VERSION=4.0.1 BUILD_SYSTEM=MAKE CXX_=g++-4.8 CC_=gcc-4.8
- LLVM_VERSION=6.0.0 BUILD_SYSTEM=MAKE CXX_=g++-4.8 CC_=gcc-4.8
- LLVM_VERSION=5.0.0 BUILD_SYSTEM=MAKE CXX_=g++-4.8 CC_=gcc-4.8
- LLVM_VERSION=4.0.1 BUILD_SYSTEM=CMAKE CXX_=g++-4.8 CC_=gcc-4.8 HALIDE_SHARED_LIBRARY=1
- LLVM_VERSION=6.0.0 BUILD_SYSTEM=CMAKE CXX_=g++-4.8 CC_=gcc-4.8 HALIDE_SHARED_LIBRARY=1
cache: apt ccache
dist: trusty
# Note the commands below are written assuming Ubuntu 12.04LTS
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ else()
endif()
endif()

if("${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}" STREQUAL "40")
message(WARNING "*** Warning: LLVM 4.x is no longer actively tested with Halide. ***")
endif()

# Notify the user what paths and LLVM version we are using
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,7 @@ CXX_FLAGS += -funwind-tables
print-%:
@echo '$*=$($*)'

# Append the --link-static flag to llvm-config if it exists. We can
# make this unconditional once llvm 4.0 is the minimum version we
# support.
LLVM_LINK_STATIC_FLAG = $(shell $(LLVM_CONFIG) --link-static 2>/dev/null && echo " --link-static")

LLVM_STATIC_LIBS = -L $(LLVM_LIBDIR) $(shell $(LLVM_CONFIG) $(LLVM_LINK_STATIC_FLAG) --libs bitwriter bitreader linker ipo mcjit $(X86_LLVM_CONFIG_LIB) $(ARM_LLVM_CONFIG_LIB) $(OPENCL_LLVM_CONFIG_LIB) $(METAL_LLVM_CONFIG_LIB) $(PTX_LLVM_CONFIG_LIB) $(AARCH64_LLVM_CONFIG_LIB) $(MIPS_LLVM_CONFIG_LIB) $(POWERPC_LLVM_CONFIG_LIB) $(HEXAGON_LLVM_CONFIG_LIB) $(AMDGPU_LLVM_CONFIG_LIB))
LLVM_STATIC_LIBS = -L $(LLVM_LIBDIR) $(shell $(LLVM_CONFIG) --link-static --libs bitwriter bitreader linker ipo mcjit $(X86_LLVM_CONFIG_LIB) $(ARM_LLVM_CONFIG_LIB) $(OPENCL_LLVM_CONFIG_LIB) $(METAL_LLVM_CONFIG_LIB) $(PTX_LLVM_CONFIG_LIB) $(AARCH64_LLVM_CONFIG_LIB) $(MIPS_LLVM_CONFIG_LIB) $(POWERPC_LLVM_CONFIG_LIB) $(HEXAGON_LLVM_CONFIG_LIB) $(AMDGPU_LLVM_CONFIG_LIB))

# Add a rpath to the llvm used for linking, in case multiple llvms are
# installed. Bakes a path on the build system into the .so, so don't
Expand Down Expand Up @@ -1635,6 +1630,11 @@ endif
ifneq ($(LLVM_OK), )
$(BUILD_DIR)/llvm_ok: $(BUILD_DIR)/rtti_ok
@echo "Found a new enough version of llvm"
ifeq ($(LLVM_VERSION_TIMES_10), 40)
@echo
@echo "*** Warning: LLVM 4.x is no longer actively tested with Halide. ***"
@echo
endif
mkdir -p $(BUILD_DIR)
touch $(BUILD_DIR)/llvm_ok
else
Expand Down

0 comments on commit 4e682ea

Please sign in to comment.