From d7e0722ca6c100bab0eb0b931e7ae7d4a6d4af49 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 17 Mar 2018 23:41:04 -0700 Subject: [PATCH] Use clang+llvm-6.0.0-amd64-unknown-freebsd-10.tar.xz before 6.0.0 it was named freebsd10 --- cmake/DefaultCMakeBuildType.cmake | 8 ++++---- cmake/DownloadAndExtractLLVM.cmake | 9 +++------ wscript | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/cmake/DefaultCMakeBuildType.cmake b/cmake/DefaultCMakeBuildType.cmake index fa86f433..89ea3ede 100644 --- a/cmake/DefaultCMakeBuildType.cmake +++ b/cmake/DefaultCMakeBuildType.cmake @@ -9,10 +9,10 @@ endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to '${DEFAULT_CMAKE_BUILD_TYPE}' as none \ was specified.") - set(CMAKE_BUILD_TYPE ${DEFAULT_CMAKE_BUILD_TYPE} + set(CMAKE_BUILD_TYPE ${DEFAULT_CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build." FORCE) - + # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo) -endif() \ No newline at end of file +endif() diff --git a/cmake/DownloadAndExtractLLVM.cmake b/cmake/DownloadAndExtractLLVM.cmake index 8fcdda64..abbdf9a9 100644 --- a/cmake/DownloadAndExtractLLVM.cmake +++ b/cmake/DownloadAndExtractLLVM.cmake @@ -26,7 +26,8 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL Windows) elseif(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) - set(CLANG_ARCHIVE_NAME clang+llvm-${CLANG_VERSION}-amd64-unknown-freebsd10) + # 6.0.0 uses freebsd-10 while 5.0.1 uses freebsd10 + set(CLANG_ARCHIVE_NAME clang+llvm-${CLANG_VERSION}-amd64-unknown-freebsd-10) endif() @@ -99,9 +100,5 @@ endif() # CMake functions have no return values so we just lift our return variable to # the parent scope set(DOWNLOADED_CLANG_DIR ${CLANG_ARCHIVE_EXTRACT_DIR} PARENT_SCOPE) - + endfunction() - - - - diff --git a/wscript b/wscript index 9be6c600..d090ab41 100644 --- a/wscript +++ b/wscript @@ -25,7 +25,7 @@ CLANG_TARBALL_EXT = '.tar.xz' if sys.platform == 'darwin': CLANG_TARBALL_NAME = 'clang+llvm-$version-x86_64-apple-darwin' elif sys.platform.startswith('freebsd'): - CLANG_TARBALL_NAME = 'clang+llvm-$version-amd64-unknown-freebsd10' + CLANG_TARBALL_NAME = 'clang+llvm-$version-amd64-unknown-freebsd-10' # It is either 'linux2' or 'linux3' before Python 3.3 elif sys.platform.startswith('linux'): # These executable depend on libtinfo.so.5